Home Explore Blog CI



git

3rd chunk of `Documentation/blame-options.adoc`
f4038b345db28d3d659e3237f17bdc68b29a62a0f9475e9f0000000100000bce
 and then
	A), the traditional 'blame' algorithm notices only half of
	the movement and typically blames the lines that were moved
	up (i.e. B) to the parent and assigns blame to the lines that
	were moved down (i.e. A) to the child commit.  With this
	option, both groups of lines are blamed on the parent by
	running extra passes of inspection.
+
<num> is optional but it is the lower bound on the number of
alphanumeric characters that Git must detect as moving/copying
within a file for it to associate those lines with the parent
commit. The default value is 20.

-C[<num>]::
	In addition to `-M`, detect lines moved or copied from other
	files that were modified in the same commit.  This is
	useful when you reorganize your program and move code
	around across files.  When this option is given twice,
	the command additionally looks for copies from other
	files in the commit that creates the file. When this
	option is given three times, the command additionally
	looks for copies from other files in any commit.
+
<num> is optional but it is the lower bound on the number of
alphanumeric characters that Git must detect as moving/copying
between files for it to associate those lines with the parent
commit. And the default value is 40. If there are more than one
`-C` options given, the <num> argument of the last `-C` will
take effect.

--ignore-rev <rev>::
	Ignore changes made by the revision when assigning blame, as if the
	change never happened.  Lines that were changed or added by an ignored
	commit will be blamed on the previous commit that changed that line or
	nearby lines.  This option may be specified multiple times to ignore
	more than one revision.  If the `blame.markIgnoredLines` config option
	is set, then lines that were changed by an ignored commit and attributed to
	another commit will be marked with a `?` in the blame output.  If the
	`blame.markUnblamableLines` config option is set, then those lines touched
	by an ignored commit that we could not attribute to another revision are
	marked with a '*'. In the porcelain modes, we print 'ignored' and
	'unblamable' on a newline respectively.

--ignore-revs-file <file>::
	Ignore revisions listed in `file`, which must be in the same format as an
	`fsck.skipList`.  This option may be repeated, and these files will be
	processed after any files specified with the `blame.ignoreRevsFile` config
	option.  An empty file name, `""`, will clear the list of revs from
	previously processed files.

--color-lines::
	Color line annotations in the default format differently if they come from
	the same commit as the preceding line. This makes it easier to distinguish
	code blocks introduced by different commits. The color defaults to cyan and
	can be adjusted using the `color.blame.repeatedLines` config option.

--color-by-age::
	Color line annotations depending on the age of the line in the default format.
	The `color.blame.highlightRecent` config option controls what color is used for
	each range of age.

-h::
	Show help message.

Title: Git Blame Options for Line Detection and Ignoring
Summary
The Git blame command provides options for detecting moved or copied lines, ignoring revisions, and customizing output, including colorizing lines based on age or repetition, and specifying files or revisions to ignore when assigning blame.