Print paths to internal files in verbose mode

When run with -v option, this prints local file names like the path
to the local git repository and the hash file.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2015-09-23 11:13:07 +02:00 committed by Dirk Hohndel
parent 3f900885df
commit a241393e7b
9 changed files with 63 additions and 9 deletions

View file

@ -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)