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 11:03] – [Basic usage] rpjday | git_blame [2019/03/07 14:04] (current) – [Some useful config options] rpjday | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Most useful variations of '' | Most useful variations of '' | ||
| - | Config options: | + | 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 17: | 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 28: | Line 31: | ||
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| ^1da177e4c3f4 (Linus Torvalds | ^1da177e4c3f4 (Linus Torvalds | ||
| - | ^1da177e4c3f4 (Linus Torvalds | + | ^1da177e4c3f4 (Linus Torvalds |
| ... snip ... | ... snip ... | ||
| </ | </ | ||
| - | and once you determine the offending line, you can examine its encompassing commit with '' | + | You can also use '' |
| < | < | ||
| - | $ git show b24413180f560 | + | $ git blame -L 1420,1430 Makefile |
| - | commit b24413180f5600bcb3bb70fbed5cf186b60864bd | + | 433db3e260bc8 (Vinícius Tinti |
| - | Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | + | 6271897978072 (Joe Perches |
| - | Date: Wed Nov 1 15:07:57 2017 +0100 | + | 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" | ||
| | | ||
| - | | + | |
| - | makes it harder for compliance tools to determine the correct license. | + | |
| | | ||
| - | ... snip ... | + | |
| + | Signed-off-by: | ||
| + | |||
| + | diff --git a/Makefile b/ | ||
| + | index b309fca4b944..b18afad2e100 100644 | ||
| + | --- a/ | ||
| + | +++ b/ | ||
| + | @@ -1293,7 +1293,7 @@ help: | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | - | ||
| + | + | ||
| + | @echo ' | ||
| + | @echo ' | ||
| + | @echo ' | ||
| </ | </ | ||
| + | ===== Some useful command-line options ===== | ||
| - | ===== Some useful options ===== | + | A // |
| - | + | ||
| - | A small subset of options for '' | + | |
| < | < | ||
| Line 62: | Line 99: | ||
| -e, --show-email | -e, --show-email | ||
| Show the author email instead of author name (Default: off). | Show the author email instead of author name (Default: off). | ||
| - | This can also be controlled via the blame.showEmail config option. | + | 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. | ||
| </ | </ | ||