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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html