summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e51ba2)
raw | patch | inline | side by side (parent: 4e51ba2)
author | Jeff King <peff@peff.net> | |
Sat, 16 Jul 2011 13:03:26 +0000 (15:03 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 19 Jul 2011 18:17:47 +0000 (11:17 -0700) |
When we want to push to a remote helper that has the
"export" capability, we collect all of the refs we want to
push and then feed them to fast-export.
However, the list of refs is actually a list of remote refs,
not local refs. The mapped local refs are included via the
peer_ref pointer. So when we add an argument to our
fast-export command line, we must be sure to use the local
peer_ref name (and if there is no local name, it is because
we are not actually sending that ref, or we may not even
have the ref at all).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"export" capability, we collect all of the refs we want to
push and then feed them to fast-export.
However, the list of refs is actually a list of remote refs,
not local refs. The mapped local refs are included via the
peer_ref pointer. So when we add an argument to our
fast-export command line, we must be sure to use the local
peer_ref name (and if there is no local name, it is because
we are not actually sending that ref, or we may not even
have the ref at all).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5800-remote-helpers.sh | patch | blob | history | |
transport-helper.c | patch | blob | history |
index ca115ccb74997fbc95b272c8b61b388b81769371..ceb0010574d276063d010320d174e5961db7ce55 100755 (executable)
compare_refs server new localclone refs/remotes/origin/new
'
-test_expect_failure 'push when remote has extra refs' '
+test_expect_success 'push when remote has extra refs' '
(cd clone &&
echo content >>file &&
git commit -a -m six &&
diff --git a/transport-helper.c b/transport-helper.c
index b560b64149ae1cefea308f2fbb3a21d09fd8c931..34d18aaedaa084cfa4fb71fa0a1498d02a5149c7 100644 (file)
--- a/transport-helper.c
+++ b/transport-helper.c
}
free(private);
- string_list_append(&revlist_args, ref->name);
+ if (ref->peer_ref)
+ string_list_append(&revlist_args, ref->peer_ref->name);
}