Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-17 00:14:48 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-17 00:14:48 +0300
commit59d0b3be457c6eda1a7f224fee85de677bd2e2d1 (patch)
treef277618806ea7d71f92ee3d5dcdc0f1216238af2 /builtin
parente3b72391d1ab9fb55a8c22a06501d7a8d7c5e02a (diff)
parent4507ecc7710e172ed36421eaa4efe743785ccb4b (diff)
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/patch-id.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 3059e525b8..822ffff51f 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -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)