Code

git-cvsimport: fix merging with remote parent branch
authorMarc-Andre Lureau <marcandre.lureau@gmail.com>
Wed, 12 Mar 2008 19:54:21 +0000 (21:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Mar 2008 04:03:39 +0000 (21:03 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-cvsimport.perl

index 9516242338d95687b4354a6d21692cbd10547899..8093996e257e510da9060a3d00661170c59437b6 100755 (executable)
@@ -730,7 +730,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;
                }
        }