From: Avery Pennarun Date: Wed, 16 Apr 2008 16:46:08 GMT Subject: Re: [PATCH 2/3] git-svn: Add --add-author-from option. Message-ID: <32541b130804160946s343d53d2l271b9391d89a7953@mail.gmail.com> In-Reply-To: <7vej96v2pk.fsf@gitster.siamese.dyndns.org> On 4/16/08, Junio C Hamano wrote: > 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