git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] xdiff: Do not consider lines starting by # hunkworthy

From
Petr Baudis <pasky@suse.cz>
Date
Oct 25, 2006, 00:07 UTC
Message-ID
<20061025000708.2753.74523.stgit@machine.or.cz>

This will be probably controversial but in my personal experience, the amount of time this is the right thing to do because of #defines is negligible compared to amount of time it is wrong, especially because of #ifs and #endifs in the middle of functions and also because of comments at the line start when it concerns non-C files.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 xdiff/xemit.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 714c563..4f20075 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -86,8 +86,7 @@ static void xdl_find_func(xdfile_t *xf, 
 		if (len > 0 &&
 		    (isalpha((unsigned char)*rec) || /* identifier? */
 		     *rec == '_' ||	/* also identifier? */
-		     *rec == '(' ||	/* lisp defun? */
-		     *rec == '#')) {	/* #define? */
+		     *rec == '(')) {	/* #define? */
 			if (len > sz)
 				len = sz;
Next: Junio C Hamano
Message 1 of 4 in “xdiff: Do not consider lines starting by # hunkworthy”
  1. xdiff: Do not consider lines starting by # hunkworthyPetr Baudis, Oct 25, 2006
  2. Junio C HamanoOct 25, 2006
  3. xdiff: Match GNU diff behaviour when deciding hunk comment worthiness of linesPetr Baudis, Oct 25, 2006
  4. Jakub NarebskiOct 25, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.