Skip to content

Commit

Permalink
Merge branch 'jx/proc-receive-hook' into pu
Browse files Browse the repository at this point in the history
* jx/proc-receive-hook:
  SQUASH???
  • Loading branch information
gitster committed Apr 12, 2020
2 parents d5c3488 + 1e4ae42 commit 2f0419b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions builtin/receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,13 +947,13 @@ static int read_proc_receive_report(struct packet_reader *reader,
}
if (reader->pktlen > len)
strbuf_addstr(&extended_status, (char *)reader->line + len + 1);
if (oidcmp(&hint->old_oid, &old_oid)) {
if (!oideq(&hint->old_oid, &old_oid)) {
oidcpy(&hint->old_oid, &old_oid);
strbuf_addf(&extended_status, "%sold-oid=%s",
extended_status.len > 0 ? " ": "",
oid_to_hex(&old_oid));
}
if (oidcmp(&hint->new_oid, &new_oid)) {
if (!oideq(&hint->new_oid, &new_oid)) {
oidcpy(&hint->new_oid, &new_oid);
strbuf_addf(&extended_status, "%snew-oid=%s",
extended_status.len > 0 ? " ": "",
Expand Down
6 changes: 2 additions & 4 deletions transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,8 @@ static void print_ref_status(char flag, const char *summary,
}
fputc('\n', stderr);
}
if (from_name)
free(from_name);
if (to_name)
free(to_name);
free(from_name);
free(to_name);
}

static void print_ok_ref_status(struct ref *ref, int porcelain, int summary_width)
Expand Down

0 comments on commit 2f0419b

Please sign in to comment.