Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_blame [2018/05/21 09:47] – [Basic usage] rpjday | git_blame [2019/03/07 14:04] (current) – [Some useful config options] rpjday | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Most useful variations of '' | Most useful variations of '' | ||
| + | |||
| + | From '' | ||
| + | |||
| + | < | ||
| + | The only difference between this command and git-blame(1) is | ||
| + | that they use slightly different output formats, and this | ||
| + | command exists only for backward compatibility to support | ||
| + | existing scripts, and provide a more familiar command name for | ||
| + | people coming from other SCM systems. | ||
| + | </ | ||
| ===== Basic usage ===== | ===== Basic usage ===== | ||
| Line 10: | Line 20: | ||
| $ git blame Makefile | $ git blame Makefile | ||
| b24413180f560 (Greg Kroah-Hartman | b24413180f560 (Greg Kroah-Hartman | ||
| - | c517d838eb7d0 | + | bfeffd1552837 |
| - | 60cc43fc88842 | + | bfeffd1552837 |
| 55922c9d1b84b (Linus Torvalds | 55922c9d1b84b (Linus Torvalds | ||
| - | 67b8d5c708122 | + | d13937116f1e8 |
| - | 75bc37fefc447 | + | 2e6e902d18502 |
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| Line 21: | Line 31: | ||
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| - | ^1da177e4c3f4 (Linus Torvalds | + | ^1da177e4c3f4 (Linus Torvalds |
| ... snip ... | ... snip ... | ||
| + | </ | ||
| + | |||
| + | You can also use '' | ||
| + | |||
| + | < | ||
| + | $ git blame -L 1420,1430 Makefile | ||
| + | 433db3e260bc8 (Vinícius Tinti | ||
| + | 6271897978072 (Joe Perches | ||
| + | 6271897978072 (Joe Perches | ||
| + | 155ad605b3c9c (Sam Ravnborg | ||
| + | |||
| + | (oh, look ...) | ||
| + | |||
| + | c4d5ee67ce265 (Robert P. J. Day 2009-04-24 12:35:23 -0400 1424) | ||
| + | ^1da177e4c3f4 (Linus Torvalds | ||
| + | ^1da177e4c3f4 (Linus Torvalds | ||
| + | f4ed1009fcea8 (Jianbin Kang | ||
| + | 3f1d9a6cec011 (Michal Marek | ||
| + | 3f1d9a6cec011 (Michal Marek | ||
| + | 3f1d9a6cec011 (Michal Marek | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Once you determine the offending line, you can examine its encompassing commit with '' | ||
| + | |||
| + | < | ||
| + | $ git show c4d5ee67ce265 | ||
| + | commit c4d5ee67ce26503d7eaf2aca5bb13c58e89d1be8 | ||
| + | Author: Robert P. J. Day < | ||
| + | Date: Fri Apr 24 12:35:23 2009 -0400 | ||
| + | |||
| + | kbuild: "make prepare" | ||
| + | | ||
| + | Correct the Makefile help text to read "make modules_prepare" | ||
| + | | ||
| + | Signed-off-by: | ||
| + | Signed-off-by: | ||
| + | |||
| + | diff --git a/Makefile b/Makefile | ||
| + | index b309fca4b944..b18afad2e100 100644 | ||
| + | --- a/Makefile | ||
| + | +++ b/Makefile | ||
| + | @@ -1293,7 +1293,7 @@ help: | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | - | ||
| + | + | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | </ | ||
| + | ===== Some useful command-line options ===== | ||
| + | |||
| + | A //very// small subset of options for '' | ||
| + | |||
| + | < | ||
| + | -L < | ||
| + | Annotate only the given line range. May be specified multiple times. | ||
| + | Overlapping ranges are allowed. | ||
| + | |||
| + | -s | ||
| + | Suppress the author name and timestamp from the output. | ||
| + | |||
| + | -e, --show-email | ||
| + | Show the author email instead of author name (Default: off). | ||
| + | This can also be controlled via the '' | ||
| + | </ | ||
| + | |||
| + | ===== Some useful config options ===== | ||
| + | |||
| + | From '' | ||
| + | |||
| + | < | ||
| + | blame.blankBoundary | ||
| + | Show blank commit object name for boundary commits in git- | ||
| + | blame(1). This option defaults to false. | ||
| + | |||
| + | blame.coloring | ||
| + | This determines the coloring scheme to be applied to blame | ||
| + | output. It can be repeatedLines, | ||
| + | which is the default. | ||
| + | |||
| + | blame.date | ||
| + | Specifies the format used to output dates in git-blame(1). | ||
| + | If unset the iso format is used. For supported values, see | ||
| + | the discussion of the --date option at git-log(1). | ||
| + | |||
| + | blame.showEmail | ||
| + | Show the author email instead of author name in git- | ||
| + | blame(1). This option defaults to false. | ||
| + | blame.showRoot | ||
| + | Do not treat root commits as boundaries in git-blame(1). | ||
| + | This option defaults to false. | ||
| </ | </ | ||