diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-07 00:10:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 08:12:57 +0200 |
commit | e92b848cb6a77172d2fbd2bda39a32e371d40eea (patch) | |
tree | 57161abfe9d8b50f2c4af07fd0bb363444eccd75 /commit.c | |
parent | revision: convert prepare_show_merge to struct object_id (diff) | |
download | git-e92b848cb6a77172d2fbd2bda39a32e371d40eea.tar.xz git-e92b848cb6a77172d2fbd2bda39a32e371d40eea.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |