summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 810799e)
raw | patch | inline | side by side (parent: 810799e)
author | Jim Meyering <jim@meyering.net> | |
Mon, 23 Oct 2006 20:22:25 +0000 (22:22 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 23 Oct 2006 21:33:54 +0000 (14:33 -0700) |
This removes trailing blanks from git-generated diff headers
the same way a similar patch did that for GNU diff:
http://article.gmane.org/gmane.comp.gnu.utils.bugs/13839
That is, it removes trailing blanks on the hunk header line that
shows the function name.
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
the same way a similar patch did that for GNU diff:
http://article.gmane.org/gmane.comp.gnu.utils.bugs/13839
That is, it removes trailing blanks on the hunk header line that
shows the function name.
Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
xdiff/xemit.c | patch | blob | history |
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 714c563547462d962b4a6b69b524092e1bc2a036..154c26fdcdbef9095e254d7b469daf11c5653a04 100644 (file)
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
*rec == '#')) { /* #define? */
if (len > sz)
len = sz;
- if (len && rec[len - 1] == '\n')
+ while (0 < len && isspace((unsigned char)rec[len - 1]))
len--;
memcpy(buf, rec, len);
*ll = len;