From: Mircea Bardac <dev@mircea.bardac.net>
To: Git Mailing List <git@vger.kernel.org>
Cc: Fredrik Skolmli <fredrik@frsk.net>
Subject: Re: git svn --use-log-author misbehavior?
Date: Fri, 20 Jun 2008 11:13:17 +0100 [thread overview]
Message-ID: <485B82BD.2000404@mircea.bardac.net> (raw)
In-Reply-To: <20080620085618.GA27940@frsk.net>
Fredrik Skolmli wrote:
> 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.
I haven't tested this yet but I have a feeling this is not my case, or I
might not be fully understanding the implications of "--add-author-from"
on the functionality of "--use-log-author". Technically, they should be
independent and the options should not depend on each other:
* --use-log-author only applies to getting info from the commits
* --add-author-from only applies to putting info in the commits
From the documentation, these 2 options can only be used with git svn
init/clone so they should somehow be saved for future use. Maybe this
doesn't happen.
My Git commits (not dcommits) already have "Signed-off-by:" at the end,
added with "git commit -s". When I do a "git svn dcommit" they get
pushed to SVN and the entire commit is rewritten. I have
--add-author-from added on git clone, but nothing else is being added to
the commit except the git-svn-id - from my point of view, according to
the documentation, this is the correct behavior (since there already is
a Signed-off-by line)
The problem is that, after the dcommit, when *viewing* the latest
commits in the git-svn repository, even though they have
"Signed-off-by:" in them, I see them not respecting the --use-log-author
option, showing up as username@uuid. What I assume is that, after a
dcommit (and everything being done on dcommit) the --use-log-author
option is ignored.
Looking over the code, I see that make_log_entry (which is responsible
for getting the correct format for the user/e-mail out of the commit
message) is only being called in do_fetch and find_parent_branch. I am
not sure if these are somehow called by cmd_dcommit.
Many thanks.
--
Mircea
http://mircea.bardac.net
next prev parent reply other threads:[~2008-06-20 10:28 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
2008-06-20 10:13 ` Mircea Bardac [this message]
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=485B82BD.2000404@mircea.bardac.net \
--to=dev@mircea.bardac.net \
--cc=fredrik@frsk.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.