diff options
author | Stefan Beller <sbeller@google.com> | 2018-05-17 15:51:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-18 08:13:10 +0900 |
commit | c88134870e8b2da084e37fb86ff88fb7d7617d61 (patch) | |
tree | ccc6e0b810e3e986d69652538b05dfe24c0c0a35 /commit.h | |
parent | shallow: add repository argument to check_shallow_file_for_update (diff) | |
download | tgif-c88134870e8b2da084e37fb86ff88fb7d7617d61.tar.xz |
shallow: add repository argument to is_repository_shallow
Add a repository argument to allow callers of is_repository_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
@@ -195,7 +195,8 @@ struct ref; 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); +#define is_repository_shallow(r) is_repository_shallow_##r() +extern int is_repository_shallow_the_repository(void); extern struct commit_list *get_shallow_commits(struct object_array *heads, int depth, int shallow_flag, int not_shallow_flag); extern struct commit_list *get_shallow_commits_by_rev_list( |