summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/shallow.c b/shallow.c
index e903651202..a0e338459f 100644
--- a/shallow.c
+++ b/shallow.c
@@ -52,7 +52,7 @@ int is_repository_shallow_the_repository(void)
return is_shallow;
if (!path)
- path = git_path_shallow();
+ path = git_path_shallow(the_repository);
/*
* fetch-pack sets '--shallow-file ""' as an indicator that no
* shallow file should be used. We could just open it and it
@@ -223,7 +223,7 @@ static void check_shallow_file_for_update_the_repository(void)
if (is_shallow == -1)
die("BUG: shallow must be initialized by now");
- if (!stat_validity_check(&shallow_stat, git_path_shallow()))
+ if (!stat_validity_check(&shallow_stat, git_path_shallow(the_repository)))
die("shallow file has changed since we read it");
}
@@ -318,7 +318,8 @@ void setup_alternate_shallow(struct lock_file *shallow_lock,
struct strbuf sb = STRBUF_INIT;
int fd;
- fd = hold_lock_file_for_update(shallow_lock, git_path_shallow(),
+ fd = hold_lock_file_for_update(shallow_lock,
+ git_path_shallow(the_repository),
LOCK_DIE_ON_ERROR);
check_shallow_file_for_update(the_repository);
if (write_shallow_commits(&sb, 0, extra)) {
@@ -365,7 +366,8 @@ void prune_shallow(int show_only)
strbuf_release(&sb);
return;
}
- fd = hold_lock_file_for_update(&shallow_lock, git_path_shallow(),
+ fd = hold_lock_file_for_update(&shallow_lock,
+ git_path_shallow(the_repository),
LOCK_DIE_ON_ERROR);
check_shallow_file_for_update(the_repository);
if (write_shallow_commits_1(&sb, 0, NULL, SEEN_ONLY)) {
@@ -374,7 +376,7 @@ void prune_shallow(int show_only)
get_lock_file_path(&shallow_lock));
commit_lock_file(&shallow_lock);
} else {
- unlink(git_path_shallow());
+ unlink(git_path_shallow(the_repository));
rollback_lock_file(&shallow_lock);
}
strbuf_release(&sb);