feature: add an option to enable --recurse-submodules=check on push (#345)

This commit is contained in:
leo 2024-08-20 15:20:58 +08:00
parent d66053a42d
commit d4a9343eaf
No known key found for this signature in database
7 changed files with 39 additions and 10 deletions

View file

@ -62,12 +62,6 @@ namespace SourceGit.ViewModels
}
}
public bool PushAllTags
{
get => _repo.Settings.PushAllTags;
set => _repo.Settings.PushAllTags = value;
}
public bool IsSetTrackOptionVisible
{
get => _isSetTrackOptionVisible;
@ -80,6 +74,23 @@ namespace SourceGit.ViewModels
set;
} = true;
public bool IsCheckSubmodulesVisible
{
get => _repo.Submodules.Count > 0;
}
public bool CheckSubmodules
{
get;
set;
} = true;
public bool PushAllTags
{
get => _repo.Settings.PushAllTags;
set => _repo.Settings.PushAllTags = value;
}
public bool ForcePush
{
get;
@ -151,8 +162,9 @@ namespace SourceGit.ViewModels
_selectedRemote.Name,
remoteBranchName,
PushAllTags,
ForcePush,
_repo.Submodules.Count > 0 && CheckSubmodules,
_isSetTrackOptionVisible && Tracking,
ForcePush,
SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;