threads / patch / 12654

patchgit-cvsimport: fix merging with remote parent branch

Subject: [PATCH] git-cvsimport: fix merging with remote parent branch

## tl;dr

One message between Mar 12, 2008 and Mar 12, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Marc-Andre Lureau· Mar 12, 2008, 19:54 UTC · lore

commit-tree fails when specifying a remote name (via -r option) and one of the parent branch has a name. Prefixing with "$remote/" fix it.

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
---
 git-cvsimport.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-cvsimport.perl +1 −1
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 47f116f..95c5eec 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -735,7 +735,7 @@ sub commit {
 		next unless $logmsg =~ $rx && $1;
 		my $mparent = $1 eq 'HEAD' ? $opt_o : $1;
 		if (my $sha1 = get_headref("$remote/$mparent")) {
-			push @commit_args, '-p', $mparent;
+			push @commit_args, '-p', "$remote/$mparent";
 			print "Merge parent branch: $mparent\n" if $opt_v;
 		}
 	}
-- 
1.5.4.4.534.gfb90c.dirty

← back to recent threads