Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Mark Wooding <mdw@distorted.org.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] xdiff: Show function names in hunk headers.
Date: Tue, 28 Mar 2006 01:50:10 -0800	[thread overview]
Message-ID: <7vvetykiel.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vfyl3m7vy.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 27 Mar 2006 21:54:25 -0800")

Junio C Hamano <junkio@cox.net> writes:

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

;-).

  reply	other threads:[~2006-03-28  9:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28  2:23 [PATCH] xdiff: Show function names in hunk headers Mark Wooding
2006-03-28  5:54 ` Junio C Hamano
2006-03-28  9:50   ` Junio C Hamano [this message]
2006-03-28 10:13     ` Mark Wooding
2006-03-28 15:03   ` Mark Wooding
2006-03-29  0:21     ` Junio C Hamano
2006-03-29  9:57       ` Mark Wooding
2006-03-28 11:07 ` Andreas Ericsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvetykiel.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=mdw@distorted.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox