git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-cvsimport: really convert underscores in branch names to dots with -u
@ 2007-11-03 11:55 Gerrit Pape
  2008-03-11 15:56 ` git-cvsimport: creating bogus branches (was: really convert underscores in branch names to dots with -u) Andreas Fuchs
  0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Pape @ 2007-11-03 11:55 UTC (permalink / raw)
  To: git, Junio C Hamano

The documentation states for the -u option that underscores in tag and
branch names are converted to dots, but this was actually implemented
for the tag names only.

Kurt Roeckx reported this through
 http://bugs.debian.org/446495

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 git-cvsimport.perl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 2954fb8..e4bc2b5 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -818,6 +818,7 @@ while (<CVS>) {
 		$state = 4;
 	} elsif ($state == 4 and s/^Branch:\s+//) {
 		s/\s+$//;
+		tr/_/\./ if ( $opt_u );
 		s/[\/]/$opt_s/g;
 		$branch = $_;
 		$state = 5;
-- 
1.5.3.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* git-cvsimport: creating bogus branches (was: really convert underscores in branch names to dots with -u)
  2007-11-03 11:55 [PATCH] git-cvsimport: really convert underscores in branch names to dots with -u Gerrit Pape
@ 2008-03-11 15:56 ` Andreas Fuchs
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Fuchs @ 2008-03-11 15:56 UTC (permalink / raw)
  To: git

Gerrit Pape <pape <at> smarden.org> writes:
> The documentation states for the -u option that underscores in tag and
> branch names are converted to dots, but this was actually implemented
> for the tag names only.

This causes a lot of problems for me with a tree that was using -u before this
change: Now there are two git branches for each CVS branch: one with and one 
without underscores. 

That's not so bad, but git-cvsimport seems to mess up the ancestry graph
by using the current master's HEAD revision as the parent of each of these new
branches. (I haven't debugged this completely, but what I see strongly 
suggests that this is what's happening.)

If you want to take a look at the mangled branches, its gitweb is at 
<http://git.boinkor.net/gitweb/sbcl-beta.git>. See for an example:
<http://git.boinkor.net/gitweb/sbcl-beta.git?a=shortlog;h=refs/heads/alpha64.2.branch>.
That's commit from 2003 having a parent commit from 2008. Right after that 
parent commit in 2008 was when I started using the new git-cvsimport.

Note that I'm not strongly to rewriting underscores in branch names as 
documented, but the way things are now, I'd have preferred the transition 
happening in a backwards-compatible way (-:

Cheers,
Andreas.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-11 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-03 11:55 [PATCH] git-cvsimport: really convert underscores in branch names to dots with -u Gerrit Pape
2008-03-11 15:56 ` git-cvsimport: creating bogus branches (was: really convert underscores in branch names to dots with -u) Andreas Fuchs

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).