{"thread":{"id":"10616","subject":"[PATCH] git-cvsimport: really convert underscores in branch names to dots with -u","startedAt":"2007-11-03T11:55:02Z","lastAt":"2008-03-11T15:56:31Z","messageCount":2,"participants":["Gerrit Pape","Andreas Fuchs"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"58103","messageId":"20071103115502.14532.qmail@d121e5a37ec172.315fe32.mid.smarden.org","threadId":"10616","inReplyTo":null,"subject":"[PATCH] git-cvsimport: really convert underscores in branch names to dots with -u","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-11-03T11:55:02Z","receivedAt":"2007-11-03T11:55:02Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"The documentation states for the -u option that underscores in tag and\nbranch names are converted to dots, but this was actually implemented\nfor the tag names only.\n\nKurt Roeckx reported this through\n http://bugs.debian.org/446495\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n git-cvsimport.perl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 2954fb8..e4bc2b5 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -818,6 +818,7 @@ while (<CVS>) {\n \t\t$state = 4;\n \t} elsif ($state == 4 and s/^Branch:\\s+//) {\n \t\ts/\\s+$//;\n+\t\ttr/_/\\./ if ( $opt_u );\n \t\ts/[\\/]/$opt_s/g;\n \t\t$branch = $_;\n \t\t$state = 5;\n-- \n1.5.3.5\n"},{"id":"71728","messageId":"loom.20080311T153924-977@post.gmane.org","threadId":"10616","inReplyTo":"20071103115502.14532.qmail@d121e5a37ec172.315fe32.mid.smarden.org","subject":"git-cvsimport: creating bogus branches (was: really convert underscores in branch names to dots with -u)","fromName":"Andreas Fuchs","fromEmail":"asf@boinkor.net","sentAt":"2008-03-11T15:56:31Z","receivedAt":"2008-03-11T15:56:31Z","isPatch":false,"sender":{"key":"asf@boinkor.net","avatar":"https://gravatar.com/avatar/665d98c9d9370d4fa7033ea20955b4ae35e3c982fc6101810be59d38638d1f3d?d=mp&s=160"},"body":"Gerrit Pape <pape <at> smarden.org> writes:\n> The documentation states for the -u option that underscores in tag and\n> branch names are converted to dots, but this was actually implemented\n> for the tag names only.\n\nThis causes a lot of problems for me with a tree that was using -u before this\nchange: Now there are two git branches for each CVS branch: one with and one \nwithout underscores. \n\nThat's not so bad, but git-cvsimport seems to mess up the ancestry graph\nby using the current master's HEAD revision as the parent of each of these new\nbranches. (I haven't debugged this completely, but what I see strongly \nsuggests that this is what's happening.)\n\nIf you want to take a look at the mangled branches, its gitweb is at \n<http://git.boinkor.net/gitweb/sbcl-beta.git>. See for an example:\n<http://git.boinkor.net/gitweb/sbcl-beta.git?a=shortlog;h=refs/heads/alpha64.2.branch>.\nThat's commit from 2003 having a parent commit from 2008. Right after that \nparent commit in 2008 was when I started using the new git-cvsimport.\n\nNote that I'm not strongly to rewriting underscores in branch names as \ndocumented, but the way things are now, I'd have preferred the transition \nhappening in a backwards-compatible way (-:\n\nCheers,\nAndreas.\n"}]}