summaryrefslogtreecommitdiff
path: root/builtin/prune.c
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2018-05-17 15:51:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-18 08:13:10 +0900
commitc88134870e8b2da084e37fb86ff88fb7d7617d61 (patch)
treeccc6e0b810e3e986d69652538b05dfe24c0c0a35 /builtin/prune.c
parentshallow: add repository argument to check_shallow_file_for_update (diff)
downloadtgif-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 'builtin/prune.c')
-rw-r--r--builtin/prune.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 8cc8659612..70ec35aa05 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -160,7 +160,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
remove_temporary_files(s);
free(s);
- if (is_repository_shallow())
+ if (is_repository_shallow(the_repository))
prune_shallow(show_only);
return 0;