summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSverre Rabbelier <srabbelier@gmail.com>2011-07-16 13:03:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-07-19 18:17:48 (GMT)
commit105fe3e457fba1dc005aa649410ec3962624232a (patch)
treed6fbd3af6608bfdffabe2610261e331338e1e314
parenta515ebe9f1ac9bc248c12a291dc008570de505ca (diff)
downloadgit-105fe3e457fba1dc005aa649410ec3962624232a.zip
git-105fe3e457fba1dc005aa649410ec3962624232a.tar.gz
git-105fe3e457fba1dc005aa649410ec3962624232a.tar.bz2
transport-helper: die early on encountering deleted refs
Remote helpers do not support deleting refs by means of the 'export' command sincethe fast-import protocol does not support it. Check explicitly for deleted refs and die early. Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--transport-helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 74c3122..4eab844 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -746,6 +746,10 @@ static int push_refs_with_export(struct transport *transport,
}
free(private);
+ if (ref->deletion) {
+ die("remote-helpers do not support ref deletion");
+ }
+
if (ref->peer_ref)
string_list_append(&revlist_args, ref->peer_ref->name);