Skip to content

Commit

Permalink
Merge branch 'rs/patch-id-use-oid-to-hex' into jch
Browse files Browse the repository at this point in the history
Code cleanup.

* rs/patch-id-use-oid-to-hex:
  patch-id: use oid_to_hex() to print multiple object IDs
  • Loading branch information
gitster committed Dec 10, 2019
2 parents 6ad6fad + 4507ecc commit cff21af
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions builtin/patch-id.c
Expand Up @@ -5,13 +5,8 @@

static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
{
char name[GIT_MAX_HEXSZ + 1];

if (!patchlen)
return;

memcpy(name, oid_to_hex(id), the_hash_algo->hexsz + 1);
printf("%s %s\n", oid_to_hex(result), name);
if (patchlen)
printf("%s %s\n", oid_to_hex(result), oid_to_hex(id));
}

static int remove_space(char *line)
Expand Down

0 comments on commit cff21af

Please sign in to comment.