Skip to content

Commit 9c51558

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a93b4a0 commit 9c51558

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

transport-helper.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,9 @@ static int push_refs_with_export(struct transport *transport,
800800
char *private;
801801
unsigned char sha1[20];
802802

803+
if (ref->deletion)
804+
die("remote-helpers do not support ref deletion");
805+
803806
private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name);
804807
if (private && !get_sha1(private, sha1)) {
805808
strbuf_addf(&buf, "^%s", private);
@@ -808,13 +811,8 @@ static int push_refs_with_export(struct transport *transport,
808811
}
809812
free(private);
810813

811-
if (ref->deletion) {
812-
die("remote-helpers do not support ref deletion");
813-
}
814-
815814
if (ref->peer_ref)
816815
string_list_append(&revlist_args, ref->peer_ref->name);
817-
818816
}
819817

820818
if (get_exporter(transport, &exporter, &revlist_args))

0 commit comments

Comments
 (0)