Skip to content

Commit 64de20a

Browse files
committed
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 <[email protected]>
1 parent e40671a commit 64de20a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

send-pack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ int send_pack(struct send_pack_args *args,
281281
char *new_hex = sha1_to_hex(ref->new_sha1);
282282
int quiet = quiet_supported && (args->quiet || !args->progress);
283283

284-
if (!cmds_sent && (status_report || use_sideband ||
285-
quiet || agent_supported)) {
284+
if (!cmds_sent)
286285
packet_buf_write(&req_buf,
287286
"%s %s %s%c%s%s%s%s%s",
288287
old_hex, new_hex, ref->name, 0,
@@ -292,7 +291,6 @@ int send_pack(struct send_pack_args *args,
292291
agent_supported ? " agent=" : "",
293292
agent_supported ? git_user_agent_sanitized() : ""
294293
);
295-
}
296294
else
297295
packet_buf_write(&req_buf, "%s %s %s",
298296
old_hex, new_hex, ref->name);

0 commit comments

Comments
 (0)