summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-04-17 23:14:32 -0500
committerJunio C Hamano <gitster@pobox.com>2013-04-17 23:27:03 -0700
commit9c51558cfb6ffe104da45d324194d9f1ebf9bc65 (patch)
tree8cbfd15b3b728717b18ec92bea0c8d4aa26e3a9c /transport-helper.c
parenta93b4a09acfed0e2a006770d0196c74968e65c25 (diff)
downloadgit-9c51558cfb6ffe104da45d324194d9f1ebf9bc65.tar.gz
transport-helper: trivial code shuffle
Just shuffle the die() part to make it more explicit, and cleanup the code-style. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 2452b3bb6d..d48e00d03c 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -800,6 +800,9 @@ static int push_refs_with_export(struct transport *transport,
char *private;
unsigned char sha1[20];
+ if (ref->deletion)
+ die("remote-helpers do not support ref deletion");
+
private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
if (private && !get_sha1(private, sha1)) {
strbuf_addf(&buf, "^%s", private);
@@ -808,13 +811,8 @@ 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);
-
}
if (get_exporter(transport, &exporter, &revlist_args))