Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@suse.cz>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] Fix empty line processing in git-shortlog.perl
Date: Sun, 06 Nov 2005 18:56:07 -0800	[thread overview]
Message-ID: <7v3bm9upx4.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20051106224218.22797.97260.stgit@machine.or.cz> (Petr Baudis's message of "Sun, 06 Nov 2005 23:42:18 +0100")

Petr Baudis <pasky@suse.cz> writes:

> Faced with a commit such as
>
> 	commit f1b2646c7f2713c3ea4bce120e1d0d8091808be4
> 	Author: Adrian Bunk <bunk@r063144.stusta.swh.mhn.de>
> 	Date:   Sun Nov 6 20:30:38 2005 +0100
>
> 	    From: Michal Wronski <wrona@mat.uni.torun.pl>
>
> 	    I've jchanged my email. Please apply this patch so as to everybody
> 	    could send me a remarks about mqueuefs.
>
> 	    Signed-off-by: Michal Wronski <Michal.Wronski@motorola.com>
> 	    Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> git-shortlog.perl would produce a line with an empty commit title.

> This patch fixes that...

> -			next unless /^\s*?(.*)/;
> +			next unless /^\s*?(\S.*)$/;

I suspect /(\S.*)$/ would do the same thing, but in any case
I do not think it is the right fix.

I think the problem is deeper than that.  Shortlog summarizes to
only one line per commit, so I suspect what you would be feeding
it would say something like this for the above example:

        commit f1b2646c7f2713c3ea4bce120e1d0d8091808be4
        Author: Adrian Bunk <bunk@r063144.stusta.swh.mhn.de>

            From: Michal Wronski <wrona@mat.uni.torun.pl>

That is, the commit you quoted is done by 'git log --pretty',
but a typical shortlog invocation would be:

	git log --pretty=short rev1..rev2 | git shortlog

With or without your fix, the command barfs.

Of course, that "From: " line should have been used as the
commit author by the tool that created the commit out of e-mail
Adrian received, but that is a separate issue.

  parent reply	other threads:[~2005-11-07  2:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06 22:42 [PATCH] Fix empty line processing in git-shortlog.perl Petr Baudis
2005-11-06 22:44 ` Petr Baudis
2005-11-07  2:56 ` Junio C Hamano [this message]
2005-11-07 20:46   ` Petr Baudis

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=7v3bm9upx4.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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