Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_blame [2019/02/17 12:49] – [Some useful options] rpjdaygit_blame [2019/03/07 14:04] (current) – [Some useful config options] rpjday
Line 2: Line 2:
  
 Most useful variations of ''git blame'', using examples from Linux kernel source. Most useful variations of ''git blame'', using examples from Linux kernel source.
 +
 +From ''man git-annotate'':
 +
 +<code>
 +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.
 +</code>
  
 ===== Basic usage ===== ===== Basic usage =====
Line 10: Line 20:
 $ git blame Makefile $ git blame Makefile
 b24413180f560 (Greg Kroah-Hartman       2017-11-01 15:07:57 +0100    1) # SPDX-License-Identifier: GPL-2.0 b24413180f560 (Greg Kroah-Hartman       2017-11-01 15:07:57 +0100    1) # SPDX-License-Identifier: GPL-2.0
-c517d838eb7d0 (Linus Torvalds           2015-02-22 18:21:14 -0800    2) VERSION = 4 +bfeffd1552837 (Linus Torvalds           2019-01-06 17:08:20 -0800    2) VERSION = 5 
-60cc43fc88842 (Linus Torvalds           2018-04-15 18:24:20 -0700    3) PATCHLEVEL = 17+bfeffd1552837 (Linus Torvalds           2019-01-06 17:08:20 -0800    3) PATCHLEVEL = 0
 55922c9d1b84b (Linus Torvalds           2011-05-29 17:43:36 -0700    4) SUBLEVEL = 0 55922c9d1b84b (Linus Torvalds           2011-05-29 17:43:36 -0700    4) SUBLEVEL = 0
-67b8d5c708122 (Linus Torvalds           2018-05-13 16:15:17 -0700    5) EXTRAVERSION = -rc5 +d13937116f1e8 (Linus Torvalds           2019-02-10 14:42:20 -0800    5) EXTRAVERSION = -rc6 
-75bc37fefc447 (Linus Torvalds           2018-05-06 16:57:38 -1000    6) NAME = Merciless Moray+2e6e902d18502 (Linus Torvalds           2018-11-25 14:19:31 -0800    6) NAME = Shy Crocodile
 ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    7)  ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    7) 
 ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    8) # *DOCUMENTATION* ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700    8) # *DOCUMENTATION*
Line 21: Line 31:
 ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   11) # Comments in this file are targeted only to the developer, do not ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   11) # Comments in this file are targeted only to the developer, do not
 ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   12) # expect to learn how to build the kernel reading this file. ^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   12) # expect to learn how to build the kernel reading this file.
-^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   13) +^1da177e4c3f4 (Linus Torvalds           2005-04-16 15:20:36 -0700   13)
 ... snip ... ... snip ...
 </code> </code>
Line 33: Line 43:
 6271897978072 (Joe Perches      2010-01-13 09:31:44 -0800 1422)         @echo                    (requires a recent binutils and recent build (System.map))' 6271897978072 (Joe Perches      2010-01-13 09:31:44 -0800 1422)         @echo                    (requires a recent binutils and recent build (System.map))'
 155ad605b3c9c (Sam Ravnborg     2005-07-07 17:56:08 -0700 1423)         @echo  dir/file.ko     - Build module including final link' 155ad605b3c9c (Sam Ravnborg     2005-07-07 17:56:08 -0700 1423)         @echo  dir/file.ko     - Build module including final link'
 +
 +   (oh, look ...)
 +
 c4d5ee67ce265 (Robert P. J. Day 2009-04-24 12:35:23 -0400 1424)         @echo  modules_prepare - Set up for building external modules' c4d5ee67ce265 (Robert P. J. Day 2009-04-24 12:35:23 -0400 1424)         @echo  modules_prepare - Set up for building external modules'
 ^1da177e4c3f4 (Linus Torvalds   2005-04-16 15:20:36 -0700 1425)         @echo  tags/TAGS       - Generate tags file for editors' ^1da177e4c3f4 (Linus Torvalds   2005-04-16 15:20:36 -0700 1425)         @echo  tags/TAGS       - Generate tags file for editors'
Line 91: Line 104:
 ===== Some useful config options ===== ===== Some useful config options =====
  
-<code> +From ''man git-config'':
-       blame.blankBoundary +
-           Show blank commit object name for boundary commits in git- +
-           blame(1). This option defaults to false.+
  
-       blame.coloring +<code> 
-           This determines the coloring scheme to be applied to blame +blame.blankBoundary 
-           output. It can be repeatedLines, highlightRecent, or none +    Show blank commit object name for boundary commits in git- 
-           which is the default.+    blame(1). This option defaults to false.
  
-       blame.date +blame.coloring 
-           Specifies the format used to output dates in git-blame(1). +    This determines the coloring scheme to be applied to blame 
-           If unset the iso format is usedFor supported valuessee +    outputIt can be repeatedLineshighlightRecent, or none 
-           the discussion of the --date option at git-log(1).+    which is the default.
  
-       blame.showEmail +blame.date 
-           Show the author email instead of author name in git- +    Specifies the format used to output dates in git-blame(1). 
-           blame(1). This option defaults to false.+    If unset the iso format is used. For supported values, see 
 +    the discussion of the --date option at git-log(1).
  
-       blame.showRoot +blame.showEmail 
-           Do not treat root commits as boundaries in git-blame(1). +    Show the author email instead of author name in git- 
-           This option defaults to false.+    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.
 </code> </code>
  • git_blame.1550407767.txt.gz
  • Last modified: 2019/02/17 12:49
  • by rpjday