git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git svn --use-log-author misbehavior?

From
Fredrik Skolmli <fredrik@frsk.net>
Date
Jun 20, 2008, 08:56 UTC
Message-ID
<20080620085618.GA27940@frsk.net>
In-Reply-To
<485AF10B.7060202@mircea.bardac.net>
On Fri, Jun 20, 2008 at 12:51:39AM +0100, Mircea Bardac wrote:
Show 10 quoted lines
> 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
Previous: Mircea BardacNext: Mircea Bardac
Message 2 of 6 in “git svn --use-log-author misbehavior?”
  1. Mircea BardacJun 19, 2008
  2. Fredrik SkolmliJun 20, 2008
  3. Mircea BardacJun 20, 2008
  4. Stephen R. van den BergJun 20, 2008
  5. Fredrik SkolmliJun 20, 2008
  6. Mircea BardacJun 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.