summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-17 22:51:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-17 23:13:10 (GMT)
commit6a2df51c848c86e5620dcdf1a0ee2de637937b77 (patch)
treee154a0df4bc19db9eb45efa9143d92d2e73601b9 /git.c
parent1f93ecd1ab15800fa98a0ce3efa5166fa642ab80 (diff)
downloadgit-6a2df51c848c86e5620dcdf1a0ee2de637937b77.zip
git-6a2df51c848c86e5620dcdf1a0ee2de637937b77.tar.gz
git-6a2df51c848c86e5620dcdf1a0ee2de637937b77.tar.bz2
shallow: add repository argument to set_alternate_shallow_file
Add a repository argument to allow callers of set_alternate_shallow_file 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 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 3a89893..5e89036 100644
--- a/git.c
+++ b/git.c
@@ -207,7 +207,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
} else if (!strcmp(cmd, "--shallow-file")) {
(*argv)++;
(*argc)--;
- set_alternate_shallow_file((*argv)[0], 1);
+ set_alternate_shallow_file(the_repository, (*argv)[0], 1);
if (envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "-C")) {