* git svn --use-log-author misbehavior? @ 2008-06-19 23:51 Mircea Bardac 2008-06-20 8:56 ` Fredrik Skolmli 0 siblings, 1 reply; 6+ messages in thread From: Mircea Bardac @ 2008-06-19 23:51 UTC (permalink / raw) To: Git Mailing List 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? Many thanks. -- Mircea http://mircea.bardac.net ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git svn --use-log-author misbehavior? 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 0 siblings, 1 reply; 6+ messages in thread From: Fredrik Skolmli @ 2008-06-20 8:56 UTC (permalink / raw) To: Mircea Bardac; +Cc: Git Mailing List 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. Signed-off-by: Fredrik Skolmli <fredrik@frsk.net> --- git-svn.perl | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index a54979d..8f77b91 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -432,6 +432,9 @@ sub cmd_dcommit { "without --no-rebase may be required." } while (1) { + if ($Git::SVN::_add_author_from) { + $Git::SVN::_use_log_author = 1; + } my $d = shift @$linear_refs or last; unless (defined $last_rev) { (undef, $last_rev, undef) = cmt_metadata("$d~1"); -- 1.5.6.6.gd3e97 -- Regards, Fredrik Skolmli ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: git svn --use-log-author misbehavior? 2008-06-20 8:56 ` Fredrik Skolmli @ 2008-06-20 10:13 ` Mircea Bardac 2008-06-20 10:48 ` Stephen R. van den Berg 2008-06-20 10:57 ` Fredrik Skolmli 0 siblings, 2 replies; 6+ messages in thread From: Mircea Bardac @ 2008-06-20 10:13 UTC (permalink / raw) To: Git Mailing List; +Cc: Fredrik Skolmli 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git svn --use-log-author misbehavior? 2008-06-20 10:13 ` Mircea Bardac @ 2008-06-20 10:48 ` Stephen R. van den Berg 2008-06-20 10:57 ` Fredrik Skolmli 1 sibling, 0 replies; 6+ messages in thread From: Stephen R. van den Berg @ 2008-06-20 10:48 UTC (permalink / raw) To: Mircea Bardac; +Cc: Git Mailing List, Fredrik Skolmli Mircea Bardac wrote: >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 They are independent. >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. At least --use-log-author can be used on git svn fetch (and possibly other subcommands) as well. And no, it currently is not being saved. -- Sincerely, Stephen R. van den Berg. Confidence is that feeling you have before you understand the situation. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git svn --use-log-author misbehavior? 2008-06-20 10:13 ` Mircea Bardac 2008-06-20 10:48 ` Stephen R. van den Berg @ 2008-06-20 10:57 ` Fredrik Skolmli 2008-06-20 12:04 ` Mircea Bardac 1 sibling, 1 reply; 6+ messages in thread From: Fredrik Skolmli @ 2008-06-20 10:57 UTC (permalink / raw) To: Mircea Bardac; +Cc: Git Mailing List On Fri, Jun 20, 2008 at 11:13:17AM +0100, Mircea Bardac wrote: > 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) Did you mean "git svn clone" here, not "git clone"? And if --use-log-author is to be used to get retrieve info from the commits, it should be used instead of --add-author-from when doing a clone. (Which as far as I can see behaves correctly.) However, looks like I might have misunderstood your problem, and possibly found a bug in the process. I'll look closer into it. :-) -- Regards, Fredrik Skolmli ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git svn --use-log-author misbehavior? 2008-06-20 10:57 ` Fredrik Skolmli @ 2008-06-20 12:04 ` Mircea Bardac 0 siblings, 0 replies; 6+ messages in thread From: Mircea Bardac @ 2008-06-20 12:04 UTC (permalink / raw) To: Git Mailing List; +Cc: Fredrik Skolmli Fredrik Skolmli wrote: > On Fri, Jun 20, 2008 at 11:13:17AM +0100, Mircea Bardac wrote: >> 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) > > Did you mean "git svn clone" here, not "git clone"? Yes, I meant "git svn clone". > And if --use-log-author > is to be used to get retrieve info from the commits, it should be used > instead of --add-author-from when doing a clone. (Which as far as I can see > behaves correctly.) That is right. I am using them like this, but according to Stephen's reply the --use-log-author option is not being saved. I assumed they were saved as an option of the git svn clone so that they would affect all future dcommits. -- Mircea http://mircea.bardac.net ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-20 12:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2008-06-20 10:48 ` Stephen R. van den Berg 2008-06-20 10:57 ` Fredrik Skolmli 2008-06-20 12:04 ` Mircea Bardac
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).