From: Junio C Hamano <gitster@pobox.com>
To: "Avery Pennarun" <apenwarr@gmail.com>
Cc: Eric Wong <normalperson@yhbt.net>, Sam Vilain <sam@vilain.net>,
git@vger.kernel.org, "Avery Pennarun" <apenwarr@versabanq.com>
Subject: Re: [PATCH 2/3] git-svn: Add --add-author-from option.
Date: Wed, 16 Apr 2008 11:36:26 -0700 [thread overview]
Message-ID: <7v3aplsl3p.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <32541b130804160946s343d53d2l271b9391d89a7953@mail.gmail.com> (Avery Pennarun's message of "Wed, 16 Apr 2008 12:46:08 -0400")
"Avery Pennarun" <apenwarr@gmail.com> writes:
> On 4/16/08, Junio C Hamano <gitster@pobox.com> 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.
Let me rephrase that to see if I understand what you are saying. If you
look at the "svn log" output (not "git svn log"), you see that the result
of "git-svn dcommit" does not record the same 'author' as git side does;
instead it uses whoever ran git-svn to propagate the commit to the SVN
side.
> 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.
Ah, that is because the way the commit is propagated is (1) you read git
commit; (2) you make a corresponding SVN commit using the log message you
read in step (1); (3) you read that SVN commit back, and create a _new_
git commit and replace what you read in step (1). The new git commit is
marked with the authorship information you obtain from the SVN side,
unless the commit log message you read back from the SVN side has these
special markers (and you are using the --use-log-author option).
Is that what is happening?
And your solution is to add these markers in step (2).
If that is the case, I understand how and why this would work around the
issue. A possible downside with this approach is that such a commit in
SVN (from SVN person's point of view) has extra information that is
unusual in the log message part (namely "From: ").
It makes me wonder if there is a better way.
For example, CVS honors LOGNAME to allow you to "lie" who the author of a
change was, which is the behaviour inherited from RCS. I have to wonder
if SVN has a similar mechanism to tell it "Excuse me, but I am just a
secretary recording changes for my boss."
But perhaps there isn't and that was why you did it this way (and that is
why --use-log-author was invented 5 months ago). And the issue that the
commit on the SVN side has unusual (again, from SVN person's point of
view) information not in the original commit on the git side might not be
so grave, so it probably is Ok.
Eric? Sam?
next prev parent reply other threads:[~2008-04-16 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 1:04 [PATCH 1/3] git-svn: add documentation for --use-log-author option apenwarr
2008-04-16 1:04 ` [PATCH 2/3] git-svn: Add --add-author-from option apenwarr
2008-04-16 1:04 ` [PATCH 3/3] git-svn: add documentation for " apenwarr
2008-04-16 4:33 ` [PATCH 2/3] git-svn: Add " Junio C Hamano
2008-04-16 16:46 ` Avery Pennarun
2008-04-16 18:36 ` Junio C Hamano [this message]
2008-04-16 18:45 ` Avery Pennarun
2008-04-16 19:11 ` Richard Quirk
2008-04-16 19:23 ` Dmitry Potapov
2008-04-16 22:24 ` Sam Vilain
2008-04-16 22:34 ` Avery Pennarun
2008-04-17 4:36 ` Eric Wong
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=7v3aplsl3p.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apenwarr@gmail.com \
--cc=apenwarr@versabanq.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=sam@vilain.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).