mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feature: bare
repository support
This commit is contained in:
parent
cc5f3ebfa5
commit
b9b5220590
6 changed files with 89 additions and 48 deletions
|
@ -31,6 +31,11 @@ namespace SourceGit.ViewModels
|
|||
set => _repo.Settings.CheckoutBranchOnCreateBranch = value;
|
||||
}
|
||||
|
||||
public bool IsBareRepository
|
||||
{
|
||||
get => _repo.IsBare;
|
||||
}
|
||||
|
||||
public CreateBranch(Repository repo, Models.Branch branch)
|
||||
{
|
||||
_repo = repo;
|
||||
|
@ -84,7 +89,7 @@ namespace SourceGit.ViewModels
|
|||
return Task.Run(() =>
|
||||
{
|
||||
var succ = false;
|
||||
if (CheckoutAfterCreated)
|
||||
if (CheckoutAfterCreated && !_repo.IsBare)
|
||||
{
|
||||
var changes = new Commands.CountLocalChangesWithoutUntracked(_repo.FullPath).Result();
|
||||
var needPopStash = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue