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

Re: [PATCH 2/3] git-svn: Add --add-author-from option.

From
Avery Pennarun <apenwarr@gmail.com>
Date
Apr 16, 2008, 16:46 UTC
Message-ID
<32541b130804160946s343d53d2l271b9391d89a7953@mail.gmail.com>
In-Reply-To
<7vej96v2pk.fsf@gitster.siamese.dyndns.org>
On 4/16/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> apenwarr@gmail.com writes:
>  > This adds a From: line (based on the commit's author information) when
>  > sending to svn.  It doesn't add if a From: or Signed-off-by: header already
>  > exists for that commit.
>
> I admit that I do not use git-svn, but I am confused.  Where are you
>  adding that "From:"?  You grab a commit log message out of git (which does
>  not have such "From:", add such a line at the beginning of the commit
>  message using the authorship information and send the resulting commit log
>  message to svn?  Why?

When git-svn copies a commit from git to svn, svn eats the authorship information; it always sets the svn author field to the username of the person logged into the svn server.

With the (existing) --use-log-author option, git-svn will pull From: and Signed-off-by: lines from svn's log entries when pulling back into git, which helps with this problem. However, it only works with commits that have a Signed-off-by: or From: already included.

The new option --add-author-from makes sure that every commit going into svn *does* have a From: or a Signed-off-by: by adding one based on the git Author field if it doesn't already exist. Combined with --use-log-author, this reduces the information loss in a round trip through the svn server. (And there's always a round trip, as "git-svn dcommit" throws away your pre-svn commits and replaces them with the commit it has put into, then pulled out of, svn.)

Does that make sense?
Thanks,
Avery
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 12 in “git-svn: add documentation for --use-log-author option.”
  1. 1/3 git-svn: add documentation for --use-log-author option.apenwarr@gmail.com, Apr 16, 2008
  2. 2/3 git-svn: Add --add-author-from option.apenwarr@gmail.com, Apr 16, 2008
  3. 3/3 git-svn: add documentation for --add-author-from option.apenwarr@gmail.com, Apr 16, 2008
  4. Junio C HamanoApr 16, 2008
  5. Avery PennarunApr 16, 2008
  6. Junio C HamanoApr 16, 2008
  7. Avery PennarunApr 16, 2008
  8. Richard QuirkApr 16, 2008
  9. Dmitry PotapovApr 16, 2008
  10. Sam VilainApr 16, 2008
  11. Avery PennarunApr 16, 2008
  12. Eric WongApr 17, 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.