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

Re: [PATCH] xdiff: Show function names in hunk headers.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 28, 2006, 09:50 UTC
Message-ID
<7vvetykiel.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vfyl3m7vy.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 9 quoted lines
> Mark Wooding <mdw@distorted.org.uk> writes:
>...
>> +		    (isalpha((unsigned char)*rec) || /* identifier? */
>> +		     *rec == '_' ||	/* also identifier? */
>> +		     *rec == '(' ||	/* lisp defun? */
>> +		     *rec == '#')) {	/* #define? */
>
> GNU diff -p does "^[[:alpha:]$_]"; personally I think any line
> that does not begin with a whitespace is good enough.

Obviously I was not thinking. That should at least be "any line that begins with a non-whitespace and has a few characters", to omit "{\n" and catch "int main()\n" in:

	int main()
        {
        	printf("Hello, world.\n");
        }
;-).
Previous: Junio C HamanoNext: Mark Wooding
Message 3 of 8 in “xdiff: Show function names in hunk headers.”
  1. xdiff: Show function names in hunk headers.Mark Wooding, Mar 28, 2006
  2. Junio C HamanoMar 28, 2006
  3. Junio C HamanoMar 28, 2006
  4. Mark WoodingMar 28, 2006
  5. Mark WoodingMar 28, 2006
  6. Junio C HamanoMar 29, 2006
  7. Mark WoodingMar 29, 2006
  8. Andreas EricssonMar 28, 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.