Skip to content

Commit

Permalink
transport-helper: trivial code shuffle
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Apr 18, 2013
1 parent a93b4a0 commit 9c51558
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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))
Expand Down

0 comments on commit 9c51558

Please sign in to comment.