@matheusbsbs / matheus-bagliano / commits / 70da769a46
Fork 0

xdiff: Match GNU diff behaviour when deciding hunk comment worthiness of lines

This removes the '#' and '(' tests and adds a '$' test instead although I have no idea what it is actually good for - but hey, if that's what GNU diff does... Pasky only went and did as Junio sayeth. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>

Petr Baudis committed Oct 25, 2006 at 02:28 UTC 70da769a4607dbbc4efc490287ead98175cf622b
1 file changed +1 -2
xdiff/xemit.c
+1 -2
@@ -86,8 +86,7 @@ static void xdl_find_func(xdfile_t *xf, long i, char *buf, long sz, long *ll) {
86 if (len > 0 &&
87 (isalpha((unsigned char)*rec) || /* identifier? */
88 *rec == '_' || /* also identifier? */
89 - *rec == '(' || /* lisp defun? */
90 - *rec == '#')) { /* #define? */
89 + *rec == '$')) { /* mysterious GNU diff's invention */
90 if (len > sz)
91 len = sz;
92 while (0 < len && isspace((unsigned char)rec[len - 1]))