aboutsummaryrefslogtreecommitdiffstats
path: root/shallow.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-10 14:48:31 -0800
committerJunio C Hamano <gitster@pobox.com>2021-02-10 14:48:31 -0800
commit9d5b1c06ac1e46e985b5d62bccb78d9fb6de374a (patch)
treec608df8a6a629c97921530898a40b7ffa52b1a35 /shallow.c
parentSync with 2.30.1 (diff)
parentoid_pos(): access table through const pointers (diff)
downloadgit-9d5b1c06ac1e46e985b5d62bccb78d9fb6de374a.tar.gz
git-9d5b1c06ac1e46e985b5d62bccb78d9fb6de374a.zip
Merge branch 'jk/use-oid-pos'
Code clean-up to ensure our use of hashtables using object names as keys use the "struct object_id" objects, not the raw hash values. * jk/use-oid-pos: oid_pos(): access table through const pointers hash_pos(): convert to oid_pos() rerere: use strmap to store rerere directories rerere: tighten rr-cache dirname check rerere: check dirname format while iterating rr_cache directory commit_graft_pos(): take an oid instead of a bare hash
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index 91b9e1073c..9ed18eb884 100644
--- a/shallow.c
+++ b/shallow.c
@@ -41,7 +41,7 @@ int register_shallow(struct repository *r, const struct object_id *oid)
int unregister_shallow(const struct object_id *oid)
{
- int pos = commit_graft_pos(the_repository, oid->hash);
+ int pos = commit_graft_pos(the_repository, oid);
if (pos < 0)
return -1;
if (pos + 1 < the_repository->parsed_objects->grafts_nr)