author | Junio C Hamano <junkio@cox.net> | |
Fri, 22 Sep 2006 23:17:58 +0000 (16:17 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 22 Nov 2006 05:27:51 +0000 (21:27 -0800) | ||
commit | 1a9eb3b9d50367bee8fe85022684d812816fe531 | |
tree | 32f72067319d73d0eaa19d91dd6e9308c4f68288 | tree | snapshot |
parent | 594270635732d6320d6e6d7fa127679ae90ef5b1 | commit | diff |
git-diff/git-apply: make diff output a bit friendlier to GNU patch (part 2)
Somebody was wondering on #git channel why a git generated diff
does not apply with GNU patch when the filename contains a SP.
It is because GNU patch expects to find TAB (and trailing timestamp)
on ---/+++ (old_name and new_name) lines after the filenames.
The "diff --git" output format was carefully designed to be
compatible with GNU patch where it can, but whitespace
characters were always a pain.
This adds an extra TAB (but not trailing timestamp) to old_name
and new_name lines of git-diff output when the filename has a SP
in it. An earlier patch updated git-apply to prepare for this.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Somebody was wondering on #git channel why a git generated diff
does not apply with GNU patch when the filename contains a SP.
It is because GNU patch expects to find TAB (and trailing timestamp)
on ---/+++ (old_name and new_name) lines after the filenames.
The "diff --git" output format was carefully designed to be
compatible with GNU patch where it can, but whitespace
characters were always a pain.
This adds an extra TAB (but not trailing timestamp) to old_name
and new_name lines of git-diff output when the filename has a SP
in it. An earlier patch updated git-apply to prepare for this.
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff.c | diff | blob | history |