Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
send-pack: rename "new_refs" to "need_pack_data"
author
Junio C Hamano
<gitster@pobox.com>
Fri, 15 Aug 2014 19:23:51 +0000
(12:23 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 15 Sep 2014 20:23:19 +0000
(13:23 -0700)
The variable counts how many non-deleting command is being sent, but
is only checked with 0-ness to decide if we need to send the pack
data.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
send-pack.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
52d2ae5
)
diff --git
a/send-pack.c
b/send-pack.c
index 0cb44aba949f12b9053527c3e1d601c3eae76a1c..716c11bbdc3ab8e374d94f880df6afb1c92acd3a 100644
(file)
--- a/
send-pack.c
+++ b/
send-pack.c
@@
-220,7
+220,7
@@
int send_pack(struct send_pack_args *args,
struct strbuf req_buf = STRBUF_INIT;
struct strbuf cap_buf = STRBUF_INIT;
struct ref *ref;
struct strbuf req_buf = STRBUF_INIT;
struct strbuf cap_buf = STRBUF_INIT;
struct ref *ref;
- int ne
w_refs
;
+ int ne
ed_pack_data = 0
;
int allow_deleting_refs = 0;
int status_report = 0;
int use_sideband = 0;
int allow_deleting_refs = 0;
int status_report = 0;
int use_sideband = 0;
@@
-276,13
+276,12
@@
int send_pack(struct send_pack_args *args,
/*
* Finally, tell the other end!
*/
/*
* Finally, tell the other end!
*/
- new_refs = 0;
for (ref = remote_refs; ref; ref = ref->next) {
if (!ref_update_to_be_sent(ref, args))
continue;
if (!ref->deletion)
for (ref = remote_refs; ref; ref = ref->next) {
if (!ref_update_to_be_sent(ref, args))
continue;
if (!ref->deletion)
- ne
w_refs++
;
+ ne
ed_pack_data = 1
;
if (args->dry_run) {
ref->status = REF_STATUS_OK;
if (args->dry_run) {
ref->status = REF_STATUS_OK;
@@
-327,7
+326,7
@@
int send_pack(struct send_pack_args *args,
in = demux.out;
}
in = demux.out;
}
- if (ne
w_refs
&& cmds_sent) {
+ if (ne
ed_pack_data
&& cmds_sent) {
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
for (ref = remote_refs; ref; ref = ref->next)
ref->status = REF_STATUS_NONE;
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
for (ref = remote_refs; ref; ref = ref->next)
ref->status = REF_STATUS_NONE;