git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: linux-kernel@vger.kernel.org,
	"Jan Engelhardt" <jengelh@computergmbh.de>,
	"Sverre Rabbelier" <alturin@gmail.com>,
	"Joe Perches" <joe@perches.com>,
	git@vger.kernel.org
Subject: Re: whomto.pl -- finding out whom to send patches to
Date: Sat, 31 May 2008 12:33:58 +0200	[thread overview]
Message-ID: <19f34abd0805310333s270ab8e5pec3396a4539fd797@mail.gmail.com> (raw)
In-Reply-To: <7vr6bkofct.fsf@gitster.siamese.dyndns.org>

Hi,

On 5/30/08, Junio C Hamano <gitster@pobox.com> wrote:
> Vegard Nossum <vegard.nossum@gmail.com> writes:
>
>  > I've written this perl script that takes a patch as input and prints the
>  > authors/committers of the affected lines, using git-blame as the back end.
>  >
>  > (The purpose of this is of course to find out whom to send patches to.)
>  >
>  > There are some caveats:
>  >
>  > - If I've understood correctly, git-blame incremental output doesn't split
>  >   commits when a newer one is found, so we currently possibly take into
>  >   account more than just the last patch to touch a line. This might not be
>  >   a disadvantage, however...
>
>
> "git blame" does not give irrelevant commits in its output, with or
>  without --incremental.  Perhaps you were thinking about the "oops, earlier
>  one was wrong, here are the corrections" behaviour of "git log
>  --early-output", which is an unrelated mechanism in a different command.
>

This comment was based on my observation that several (sometimes
different) commits would span the same line numbers. Though it seems
to also happen that no line is spanned by any commit at all. I
probably misunderstood the output format of the incremental mode.

>  But I have to wonder why you used --incremental and not --porcelain
>  format, the latter of which is more compact and is designed for parsing by
>  tools.
>

There were some different reasons. I found --incremental easier to
parse, and I didn't really want the actual lines of the file. Maybe I
should rewrite to use porcelain instead :-)

>  I also have to wonder why you did not use -M, -C, and/or -w, if you used
>  blame to find the true origin of lines that are involved.
>

I haven't used these options before and didn't know if it would really
make sense to use them in this context. I guess I could allow them to
pass through from the command line to git-blame...

>  Unless the patch is truly about a narrow region of a handful files
>  (e.g. micro-optimizing the implementation of a single function without
>  changing its external interface at all, or fixing an off-by-one error in a
>  group of functions that do similar things), I suspect that it would make
>  more sense to use "git shortlog --no-merges -- paths" to get the list of
>  people who are involved in the general area, even though they may not have
>  been involved in particular _lines_ that the patch touches.  For example,
>  if a patch changes the lines in a function's implementation, you would
>  want input not only from the people who improved the implementation of the
>  function over the years, but more from the people who care about the
>  calling sites of that function the patch is touching.

Yes, it seems that log/shortlog is the most common (and probably
faster) way of doing what I'm trying to do, based on all the feedback
I had :-) However, I use git-blame myself and so I wanted to automate
that task in particular.

I did not intend for the tool to be fully automatic, however; it
outputs a ranked list of names and e-mails. The user (well, me ;-)) is
still expected to pick the sensible entries and leave out the rest.
For instance, I bet half the patches run through the script on the
linux kernel sources would turn Linus up, even though you don't want
to send patches directly there in most of the cases. And this is
simply because he did the initial commit and a lot of code may not
have changed since that...

Thanks for the comments.


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

  reply	other threads:[~2008-05-31 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 21:00 whomto.pl -- finding out whom to send patches to Vegard Nossum
2008-05-29 18:20 ` Joe Perches
2008-05-29 22:19 ` Jesper Juhl
2008-05-29 23:33 ` Junio C Hamano
2008-05-31 10:33   ` Vegard Nossum [this message]
2008-05-30  7:58 ` Andrea Righi
2008-05-31 10:03   ` Vegard Nossum
2008-05-30  9:29 ` Roel

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=19f34abd0805310333s270ab8e5pec3396a4539fd797@mail.gmail.com \
    --to=vegard.nossum@gmail.com \
    --cc=alturin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jengelh@computergmbh.de \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).