Skip to content

Commit

Permalink
send-pack: always send capabilities
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Sep 15, 2014
1 parent e40671a commit 64de20a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions send-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ int send_pack(struct send_pack_args *args,
char *new_hex = sha1_to_hex(ref->new_sha1);
int quiet = quiet_supported && (args->quiet || !args->progress);

if (!cmds_sent && (status_report || use_sideband ||
quiet || agent_supported)) {
if (!cmds_sent)
packet_buf_write(&req_buf,
"%s %s %s%c%s%s%s%s%s",
old_hex, new_hex, ref->name, 0,
Expand All @@ -292,7 +291,6 @@ int send_pack(struct send_pack_args *args,
agent_supported ? " agent=" : "",
agent_supported ? git_user_agent_sanitized() : ""
);
}
else
packet_buf_write(&req_buf, "%s %s %s",
old_hex, new_hex, ref->name);
Expand Down

0 comments on commit 64de20a

Please sign in to comment.