mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
enhance: do not show Initialize Repository
popup for bare repositories (#891)
This commit is contained in:
parent
a205e17bf2
commit
6e6cd7a7f3
2 changed files with 31 additions and 0 deletions
|
@ -300,6 +300,13 @@ namespace SourceGit.Views
|
|||
return;
|
||||
}
|
||||
|
||||
var isBare = new Commands.IsBareRepository(path).Result();
|
||||
if (isBare)
|
||||
{
|
||||
App.RaiseException(string.Empty, $"'{path}' is a bare repository, which is not supported by SourceGit!");
|
||||
return;
|
||||
}
|
||||
|
||||
var test = new Commands.QueryRepositoryRootPath(path).ReadToEnd();
|
||||
if (!test.IsSuccess || string.IsNullOrEmpty(test.StdOut))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue