Skip to content

Commit

Permalink
xdiff/xemit.c (xdl_find_func): Elide trailing white space in a contex…
Browse files Browse the repository at this point in the history
…t header.

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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
meyering authored and Junio C Hamano committed Oct 23, 2006
1 parent 810799e commit 67aef03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdiff/xemit.c
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ static void xdl_find_func(xdfile_t *xf, long i, char *buf, long sz, long *ll) {
*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;

0 comments on commit 67aef03

Please sign in to comment.