Skip to content

Commit 59d0b3b

Browse files
committed
Merge branch 'rs/patch-id-use-oid-to-hex'
Code cleanup. * rs/patch-id-use-oid-to-hex: patch-id: use oid_to_hex() to print multiple object IDs
2 parents e3b7239 + 4507ecc commit 59d0b3b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

builtin/patch-id.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@
55

66
static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
77
{
8-
char name[GIT_MAX_HEXSZ + 1];
9-
10-
if (!patchlen)
11-
return;
12-
13-
memcpy(name, oid_to_hex(id), the_hash_algo->hexsz + 1);
14-
printf("%s %s\n", oid_to_hex(result), name);
8+
if (patchlen)
9+
printf("%s %s\n", oid_to_hex(result), oid_to_hex(id));
1510
}
1611

1712
static int remove_space(char *line)

0 commit comments

Comments
 (0)