author | Junio C Hamano <junkio@cox.net> | |
Thu, 26 Oct 2006 07:05:04 +0000 (00:05 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 26 Oct 2006 08:18:49 +0000 (01:18 -0700) | ||
commit | d5f6a01af0658bc0ec5f068d81ba321be94526d5 | |
tree | 74c39f25881a87278e0376abc67cf47ff0d37690 | tree | snapshot |
parent | 0ac3056850394723c9b407754b44d3d37f1dcc3f | commit | diff |
combine-diff: a few more finishing touches.
"new file" and "deleted file" were already reported in the
original code, but the logic was not as transparent as it could
have. This uses a few variables and more comments to clarify
the flow. The rule is: (1) if a path exists in the merge result
when no parent had it, we report "new" (otherwise it came from
the parents, as opposed to have added by the evil merge). (2) if
the path does not exist in the merge result, it is "deleted".
Since we can say "new" and "deleted", there is no reason not to
follow the /dev/null convention. This fixes it.
Appending function name after @@@ ... @@@ is trivial, so
implement it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
"new file" and "deleted file" were already reported in the
original code, but the logic was not as transparent as it could
have. This uses a few variables and more comments to clarify
the flow. The rule is: (1) if a path exists in the merge result
when no parent had it, we report "new" (otherwise it came from
the parents, as opposed to have added by the evil merge). (2) if
the path does not exist in the merge result, it is "deleted".
Since we can say "new" and "deleted", there is no reason not to
follow the /dev/null convention. This fixes it.
Appending function name after @@@ ... @@@ is trivial, so
implement it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/diff-format.txt | diff | blob | history | |
combine-diff.c | diff | blob | history |