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");
};-).