send-pack: always send capabilities

We tried to avoid sending one extra byte, NUL and nothing behind it to signal there is no protocol capabilities being sent, on the first command packet on the wire, but it just made the code look ugly. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Aug 15, 2014 at 11:30 UTC 64de20a1265b676f9cc0e5f46379a017560fa333
1 file changed +1 -3
send-pack.c
+1 -3
@@ -281,8 +281,7 @@ int send_pack(struct send_pack_args *args,
281 char *new_hex = sha1_to_hex(ref->new_sha1);
282 int quiet = quiet_supported && (args->quiet || !args->progress);
283
284 - if (!cmds_sent && (status_report || use_sideband ||
285 - quiet || agent_supported)) {
284 + if (!cmds_sent)
285 packet_buf_write(&req_buf,
286 "%s %s %s%c%s%s%s%s%s",
287 old_hex, new_hex, ref->name, 0,
@@ -292,7 +291,6 @@ int send_pack(struct send_pack_args *args,
291 agent_supported ? " agent=" : "",
292 agent_supported ? git_user_agent_sanitized() : ""
293 );
295 - }
294 else
295 packet_buf_write(&req_buf, "%s %s %s",
296 old_hex, new_hex, ref->name);