Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
transport-helper: trivial code shuffle
author
Felipe Contreras
<felipe.contreras@gmail.com>
Thu, 18 Apr 2013 04:14:32 +0000
(23:14 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 18 Apr 2013 06:27:03 +0000
(23:27 -0700)
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>
transport-helper.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a93b4a0
)
diff --git
a/transport-helper.c
b/transport-helper.c
index 2452b3bb6d6bd6235376e4fbe87754cf0160006d..d48e00d03cc6276a921b841cf6a1d25a08d6993b 100644
(file)
--- 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];
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);
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);
}
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 (ref->peer_ref)
string_list_append(&revlist_args, ref->peer_ref->name);
-
}
if (get_exporter(transport, &exporter, &revlist_args))
}
if (get_exporter(transport, &exporter, &revlist_args))