summaryrefslogtreecommitdiff
path: root/builtin/replace.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:38 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:15:38 +0900
commitbc01ef0d3f3f79fc2f1a9e5e1a6ac0049e7a3c26 (patch)
tree2f4f641fe1d78571baaa7e90f11d79aeea8aad26 /builtin/replace.c
parentcab8b4084d97b4c063bd8546fe6d68a49374016f (diff)
downloadgit-bc01ef0d3f3f79fc2f1a9e5e1a6ac0049e7a3c26.tar.gz
git-bc01ef0d3f3f79fc2f1a9e5e1a6ac0049e7a3c26.tar.bz2
git-bc01ef0d3f3f79fc2f1a9e5e1a6ac0049e7a3c26.zip
Imported Upstream version 2.7.0upstream/2.7.0
Diffstat (limited to 'builtin/replace.c')
-rw-r--r--builtin/replace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/replace.c b/builtin/replace.c
index 6b3c469a..748c6ca9 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -358,10 +358,10 @@ static void check_one_mergetag(struct commit *commit,
/* iterate over new parents */
for (i = 1; i < mergetag_data->argc; i++) {
- unsigned char sha1[20];
- if (get_sha1(mergetag_data->argv[i], sha1) < 0)
+ struct object_id oid;
+ if (get_sha1(mergetag_data->argv[i], oid.hash) < 0)
die(_("Not a valid object name: '%s'"), mergetag_data->argv[i]);
- if (!hashcmp(tag->tagged->sha1, sha1))
+ if (!oidcmp(&tag->tagged->oid, &oid))
return; /* found */
}