diff options
Diffstat (limited to 'git-access.c')
-rw-r--r-- | git-access.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-access.c b/git-access.c index 25f1d9e8a..eee066007 100644 --- a/git-access.c +++ b/git-access.c @@ -806,7 +806,7 @@ static struct git_repository *is_remote_git_repository(char *remote, const char /* * If it's not a git repo, return NULL. Be very conservative. */ -struct git_repository *is_git_repository(const char *filename, const char **branchp, const char **remote) +struct git_repository *is_git_repository(const char *filename, const char **branchp, const char **remote, bool dry_run) { int flen, blen, ret; int offset = 1; @@ -857,6 +857,9 @@ struct git_repository *is_git_repository(const char *filename, const char **bran return dummy_git_repository; } + if (dry_run) + return dummy_git_repository; + repo = is_remote_git_repository(loc, branch); if (repo) { if (remote) |