mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
parent
942f349275
commit
3ca4dc488c
7 changed files with 41 additions and 8 deletions
|
@ -36,6 +36,12 @@ namespace SourceGit.ViewModels
|
|||
set => _repo.Settings.KeepIndexWhenStash = value;
|
||||
}
|
||||
|
||||
public bool AutoRestore
|
||||
{
|
||||
get => _repo.Settings.AutoRestoreAfterStash;
|
||||
set => _repo.Settings.AutoRestoreAfterStash = value;
|
||||
}
|
||||
|
||||
public StashChanges(Repository repo, List<Models.Change> changes, bool hasSelectedFiles)
|
||||
{
|
||||
_repo = repo;
|
||||
|
@ -84,6 +90,9 @@ namespace SourceGit.ViewModels
|
|||
succ = StashWithChanges(_changes);
|
||||
}
|
||||
|
||||
if (AutoRestore && succ)
|
||||
succ = new Commands.Stash(_repo.FullPath).Apply();
|
||||
|
||||
CallUIThread(() =>
|
||||
{
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue