From 6a2df51c848c86e5620dcdf1a0ee2de637937b77 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Thu, 17 May 2018 15:51:43 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git.c') diff --git a/git.c b/git.c index 3a89893712..5e8903681e 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")) { -- cgit 1.2.3-korg