mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Return the correct paths when is_git_repository() is called as dry_run
Otherwise we are creating the local git cache path with the remote variable being uninitialized - which can cause crashes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c50fc04a82
commit
3c2965b151
1 changed files with 4 additions and 2 deletions
|
@ -857,9 +857,11 @@ struct git_repository *is_git_repository(const char *filename, const char **bran
|
|||
return dummy_git_repository;
|
||||
}
|
||||
|
||||
if (dry_run)
|
||||
if (dry_run) {
|
||||
*branchp = branch;
|
||||
*remote = loc;
|
||||
return dummy_git_repository;
|
||||
|
||||
}
|
||||
repo = is_remote_git_repository(loc, branch);
|
||||
if (repo) {
|
||||
if (remote)
|
||||
|
|
Loading…
Reference in a new issue