All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bhushan Lodha <bhushanlodha@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jakub Narębski" <jnareb@gmail.com>,
	"René Scharfe" <l.s.r@web.de>,
	git@vger.kernel.org, "Jeff King" <peff@peff.net>,
	"David Dalrymple (on zayin)" <davidad@alum.mit.edu>
Subject: Re: [PATCH 06/10] log: --function-name pickaxe
Date: Mon, 28 Apr 2014 16:04:40 -0400	[thread overview]
Message-ID: <CAHqUa-3myd+ephcRBQ97gV02BJqzKLqowU4GFi-PsS6qzCMQUw@mail.gmail.com> (raw)
In-Reply-To: <xmqqlhvlorug.fsf@gitster.dls.corp.google.com>

I plan to work on this in few weeks. If anybody has more suggestion or
want to discuss the implementation let me know

On Fri, Apr 4, 2014 at 2:46 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jakub Narębski <jnareb@gmail.com> writes:
>
>> W dniu 2014-04-03 23:44, Junio C Hamano pisze:
>>> René Scharfe <l.s.r@web.de> writes:
>>>
>>>> With that approach you depend on the hunk header and apparently need
>>>> to add XDL_EMIT_MOREFUNCNAMES and XDL_EMIT_MOREHUNKHEADS to improve
>>>> the results.  This approach feels fragile.
>>>>
>>>> Would it perhaps be more robust to not base the implementation on diff
>>>> and instead to scan the raw file contents?
>>>
>>> That is an interesting idea.
>>>
>>> Perhaps this can be implemented as a new stage in the transformation
>>> pipeline, I wonder?  There is currently no transformation that
>>> modifies the blob contents being compared, but I do not think there
>>> is anything fundamental that prevents one from being written.  The
>>> new "limit to this function body" transformation would perhaps sit
>>> before the diffcore-rename and would transform all the blobs to
>>> empty, except for the part that is the body of the function the user
>>> is interested in.
>>
>> Well, there is 'texconv', e.g.
>>
>>   .gitattributes
>>   *.jpg diff=jpg
>>
>>   .git/config
>>   [diff "jpg"]
>>          textconv = exif
>
> ;-)  So you could define this textconv
>
>     sed -n -e '/^int main(/,/^}/p'
>
> to limit the output only to the definition of the function main().
>
>> Doesn't it fit in said place in the transformation pipeline?
>
> Not at all, unfortunately.  The textconv conversion happens in the
> final output stage and comes way too late to influence the earlier
> stages like renames and pickaxe, which will still see the whole
> contents outside the definition of the function main().
>
>
>

  reply	other threads:[~2014-04-28 20:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 18:50 [PATCH 00/10] [RFC] pickaxe for function names David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50 ` [PATCH 01/10] .gitattributes: specify the language used David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 02/10] diffcore-pickaxe.c: refactor regex compilation David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 03/10] diffcore-pickaxe.c: Refactor pickaxe_fn signature David A. Dalrymple (and Bhushan G. Lodha)
2014-04-04 11:09     ` Jakub Narębski
2014-03-27 18:50   ` [PATCH 04/10] diff.c/diff.h: expose userdiff_funcname David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 05/10] diffcore-pickaxe.c: set up funcname pattern David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 06/10] log: --function-name pickaxe David A. Dalrymple (and Bhushan G. Lodha)
2014-04-03 21:25     ` René Scharfe
2014-04-03 21:44       ` Junio C Hamano
2014-04-04 11:15         ` Jakub Narębski
2014-04-04 18:46           ` Junio C Hamano
2014-04-28 20:04             ` Bhushan Lodha [this message]
2014-03-27 18:50   ` [PATCH 07/10] xdiff: add XDL_EMIT_MOREFUNCNAMES David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 08/10] xdiff: add XDL_EMIT_MOREHUNKHEADS David A. Dalrymple (and Bhushan G. Lodha)
2014-03-27 18:50   ` [PATCH 09/10] t4213: test --function-name option David A. Dalrymple (and Bhushan G. Lodha)
2014-03-28  7:25     ` Johannes Sixt
2014-03-28  8:21       ` Eric Sunshine
2014-03-28 11:45       ` Johannes Sixt
2014-04-04 11:21     ` Jakub Narębski
2014-03-27 18:50   ` [PATCH 10/10] Documentation: Document --function-name usage David A. Dalrymple (and Bhushan G. Lodha)
2014-03-28  0:30     ` Eric Sunshine
2014-03-27 19:03 ` [PATCH 00/10] [RFC] pickaxe for function names Jeff King

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=CAHqUa-3myd+ephcRBQ97gV02BJqzKLqowU4GFi-PsS6qzCMQUw@mail.gmail.com \
    --to=bhushanlodha@gmail.com \
    --cc=davidad@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=l.s.r@web.de \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.