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: Mon, 27 Mar 2006 21:54:25 -0800	[thread overview]
Message-ID: <7vfyl3m7vy.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <11435126113456-git-send-email-mdw@distorted.org.uk> (Mark Wooding's message of "Tue, 28 Mar 2006 03:23:31 +0100")

Mark Wooding <mdw@distorted.org.uk> writes:

> The function names are parsed by a particularly stupid algorithm at the
> moment: it just tries to find a line in the `old' file, from before the
> start of the hunk, whose first character looks plausible.  Still, it's
> most definitely a start.

> +		    (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.  In either
way, your patch is good.  Thanks.

  reply	other threads:[~2006-03-28  5:54 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 [this message]
2006-03-28  9:50   ` Junio C Hamano
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=7vfyl3m7vy.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