Signed-off-by: Bo Yang <struggleyb.nku@xxxxxxxxx> --- Documentation/git-log.txt | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 0e6ff31..14a9703 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -9,6 +9,7 @@ git-log - Show commit logs SYNOPSIS -------- 'git log' [<options>] [<since>..<until>] [[\--] <path>...] +'git log' [<options>] -L n,m <path> DESCRIPTION ----------- @@ -19,6 +20,9 @@ command to control what is shown and how, and options applicable to the 'git diff-*' commands to control how the changes each commit introduces are shown. +With '-L' option, the command will help to trace the history of user specified +line ranges. It can trace multiple ranges coming from multiple files. + OPTIONS ------- @@ -72,6 +76,32 @@ include::diff-options.txt[] to be prefixed with "\-- " to separate them from options or refnames. +-L <start>,<end>:: + The line range. <start> and <end> can take one of these forms: + +- number ++ +If <start> or <end> is a number, it specifies an +absolute line number (lines count from 1). ++ + +- /regex/ ++ +This form will use the first line matching the given +POSIX regex. If <end> is a regex, it will search +starting at the line given by <start>. ++ + +- +offset or -offset ++ +This is only valid for <end> and will specify a number +of lines before or after the line given by <start>. ++ + +--always-print:: + Always print the interesting range even if the current commit + does not change any line of the range. + include::rev-list-options.txt[] -- 1.7.1.577.g36cf0.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html