diff options
Diffstat (limited to 'repository.c')
-rw-r--r-- | repository.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/repository.c b/repository.c index 95d10cc4a0..9825a30899 100644 --- a/repository.c +++ b/repository.c @@ -16,6 +16,14 @@ #include "promisor-remote.h" #include "refs.h" +/* + * We do not define `USE_THE_REPOSITORY_VARIABLE` in this file because we do + * not want to rely on functions that implicitly use `the_repository`. This + * means that the `extern` declaration of `the_repository` isn't visible here, + * which makes sparse unhappy. We thus declare it here. + */ +extern struct repository *the_repository; + /* The main repository */ static struct repository the_repo; struct repository *the_repository = &the_repo; |