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:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-07 01:10:06 +0300
committerJunio C Hamano <gitster@pobox.com>2017-05-08 09:12:57 +0300
commite92b848cb6a77172d2fbd2bda39a32e371d40eea (patch)
tree57161abfe9d8b50f2c4af07fd0bb363444eccd75 /commit.c
parent68ab61dd099a2ce9f700fa68b9b7cc7722304407 (diff)
shallow: convert shallow registration functions to object_id
Convert register_shallow and unregister_shallow to take struct object_id. register_shallow is a caller of lookup_commit, which we will convert later. It doesn't make sense for the registration and unregistration functions to have incompatible interfaces, so convert them both. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 73c78c2b80..ec41ba5e09 100644
--- a/commit.c
+++ b/commit.c
@@ -216,9 +216,9 @@ int for_each_commit_graft(each_commit_graft_fn fn, void *cb_data)
return ret;
}
-int unregister_shallow(const unsigned char *sha1)
+int unregister_shallow(const struct object_id *oid)
{
- int pos = commit_graft_pos(sha1);
+ int pos = commit_graft_pos(oid->hash);
if (pos < 0)
return -1;
if (pos + 1 < commit_graft_nr)