git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Eric Wong <normalperson@yhbt.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Andy Whitcroft <apw@shadowen.org>
Subject: Re: [updated PATCH] Same default as cvsimport when using --use-log-author
Date: Tue, 29 Apr 2008 23:13:56 +0200	[thread overview]
Message-ID: <20080429211356.GA6825@cuci.nl> (raw)
In-Reply-To: <20080429061823.GE24171@muzzle>

Eric Wong wrote:
>Junio C Hamano <gitster@pobox.com> wrote:
>> "Stephen R. van den Berg" <srb@cuci.nl> writes:
>> > git-svn supports an experimental option --use-log-author which currently
>> > results in:

>> > Author: foobaruser <unknown>

>> I have a question about this.  Is the "<unknown> coming from...

I have to correct myself here.  What happens is that if in the commit
message there is no From: or Signed-off-by: to be found to parse, that
results in an empty $name_field, and causes $email to stay undefined,
which eventually results in the same silly generated UUID-domain I'm
trying to get rid of.

So it's not triggering the 'unknown' above.

>> I would think not -- if that is the case, the codepath you added as a fix
>> would not trigger.  Which means in some other cases, the 'unknown' we see
>> above in the context also still happens.  Is it a good thing?  Maybe we
>> would also want to make it consistently do "somebody <somebody>" instead,
>> by doing...

>I don't think Stephen's patch ever gets triggered, either.

Well, it is triggered, but rather because $name_field is empty, and
consequently $email is never set.

>$email does appear to get set correctly for the first two elsifs cases
>here in the existing code:

>So I propose the following one-line change instead of Stephen's:

>diff --git a/git-svn.perl b/git-svn.perl
>@@ -2432,7 +2432,7 @@ sub make_log_entry {
>-			($name, $email) = ($name_field, 'unknown');
>+			($name, $email) = ($name_field, $name_field);

That is a good change (IMO), but I still need my patch (or something
similar) to cover the undefined $name_field case.  Proposed new patch
follows.
-- 
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg.

"There's a lot to be said for not saying a lot."

  parent reply	other threads:[~2008-04-29 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 17:32 [updated PATCH] Same default as cvsimport when using --use-log-author Stephen R. van den Berg
2008-04-27 20:47 ` Junio C Hamano
2008-04-29  6:18   ` Eric Wong
2008-04-29  9:52     ` Andy Whitcroft
2008-04-29 21:13     ` Stephen R. van den Berg [this message]
2008-04-29 21:20       ` [updated2 PATCH] git-svn: " Stephen R. van den Berg
2008-05-01  3:47         ` Eric Wong
2008-04-28 10:15 ` [updated PATCH] " Johannes Schindelin

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=20080429211356.GA6825@cuci.nl \
    --to=srb@cuci.nl \
    --cc=apw@shadowen.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.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 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).