Search code examples
gitgit-blame

What exactly is incremental about git blame --incremental?


The docs state:

--incremental Show the result incrementally in a format designed for machine consumption.

But looking at the output I don't see anything more than it being a summary without the actual lines of the files.

How does --incremental actually differ from -p?


Solution

  • From https://www.kernel.org/pub/software/scm/git/docs/git-blame.html :

    -p --porcelain Show in a format designed for machine consumption.

    --incremental Show the result incrementally in a format designed for machine consumption.

    I found this comment from Junio and have the difference bolded:

    When called with --incremental option, the command outputs the result as it is built. The output generally will talk about lines touched by more recent commits first and is meant to be used by interactive viewers.

    The output format is similar to the Porcelain format, but it does not contain the actual lines from the file that is being annotated.