All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fredrik Skolmli <fredrik@frsk.net>
To: Mircea Bardac <dev@mircea.bardac.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git svn --use-log-author misbehavior?
Date: Fri, 20 Jun 2008 10:56:18 +0200	[thread overview]
Message-ID: <20080620085618.GA27940@frsk.net> (raw)
In-Reply-To: <485AF10B.7060202@mircea.bardac.net>

On Fri, Jun 20, 2008 at 12:51:39AM +0100, Mircea Bardac wrote:
> Hi,
> 
> According to the documentation, this parameter (--use-log-author) should 
>  use the author from the From/Signed-off-by line. Unfortunately, I 
> found this to be working only on the first git svn clone. Later rebasing 
> made the commits use the old username@uuid format.
> 
> I am assuming the option is not being preserved in the Git repository 
> metadata and it is only used on cloning/init. Is this the intended 
> behavior?

Doesn't look like it. When you're using --add-author-from on dcommit, git-svn
doesn't seem to know that it should look after "From:" in the commit, thus
not setting the author correctly. The following oneliner should solve the
case. Please let me know if it works as well for you as it did for me.
 
Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
---
 git-svn.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index a54979d..8f77b91 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -432,6 +432,9 @@ sub cmd_dcommit {
 		     "without --no-rebase may be required."
 	}
 	while (1) {
+		if ($Git::SVN::_add_author_from) {
+			$Git::SVN::_use_log_author = 1;
+		}
 		my $d = shift @$linear_refs or last;
 		unless (defined $last_rev) {
 			(undef, $last_rev, undef) = cmt_metadata("$d~1");
-- 
1.5.6.6.gd3e97

-- 
Regards,
Fredrik Skolmli

  reply	other threads:[~2008-06-20  9:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 23:51 git svn --use-log-author misbehavior? Mircea Bardac
2008-06-20  8:56 ` Fredrik Skolmli [this message]
2008-06-20 10:13   ` Mircea Bardac
2008-06-20 10:48     ` Stephen R. van den Berg
2008-06-20 10:57     ` Fredrik Skolmli
2008-06-20 12:04       ` Mircea Bardac

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=20080620085618.GA27940@frsk.net \
    --to=fredrik@frsk.net \
    --cc=dev@mircea.bardac.net \
    --cc=git@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 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.