diff options
author | Stefan Beller <sbeller@google.com> | 2018-05-18 01:51:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-18 02:13:10 +0300 |
commit | 19143f139d5a1a821d9d066da5d1c136a53ed803 (patch) | |
tree | ab0d2e1bb32fd1ea44488f0347c157c8c723103e /commit.h | |
parent | 6a2df51c848c86e5620dcdf1a0ee2de637937b77 (diff) |
shallow: add repository argument to register_shallow
Add a repository argument to allow callers of register_shallow
to be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.
As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -191,7 +191,8 @@ extern struct commit_list *get_merge_bases_many_dirty(struct commit *one, int n, struct oid_array; struct ref; -extern int register_shallow(const struct object_id *oid); +#define register_shallow(r, o) register_shallow_##r(o); +extern int register_shallow_the_repository(const struct object_id *oid); extern int unregister_shallow(const struct object_id *oid); extern int for_each_commit_graft(each_commit_graft_fn, void *); extern int is_repository_shallow(void); |