I am doing a git diff
and for the first time, I am seeing double plus-signs next to lines.
++ if ($field_name == $selected) {
++
++
These lines are added since the last version.
From the manual page:
- static void describe(char *arg)
-static void describe(struct commit *cmit, int last_one)
++static void describe(char *arg, int last_one)
In the above example output, the function signature was changed from both files (hence two - removals from both file1 and file2, plus ++ to mean one line that was added does not appear in either file1 nor file2). Also eight other lines are the same from file1 but do not appear in file2 (hence prefixed with {plus}).
See diff manual:
https://www.kernel.org/pub/software/scm/git/docs/v1.7.3/git-diff.html
The ++
in diff output is from a "combined diff", which is the default format for git diff
when showing merges (or when using the -c
, -cc
or -m
options)
When viewing a combined diff, if the two files you're comparing have a line that's different from what they were merged into, you will see the ++
to represent:
one line that was added does not appear in either file1 or file2