mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45:00 +00:00
feature: add option to enable --keep-index
option of git stash push
command (#610)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
3e6e0befaa
commit
566d36ca59
6 changed files with 22 additions and 5 deletions
|
@ -28,6 +28,12 @@ namespace SourceGit.ViewModels
|
|||
set;
|
||||
}
|
||||
|
||||
public bool KeepIndex
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public StashChanges(Repository repo, List<Models.Change> changes, bool hasSelectedFiles)
|
||||
{
|
||||
_repo = repo;
|
||||
|
@ -36,6 +42,7 @@ namespace SourceGit.ViewModels
|
|||
HasSelectedFiles = hasSelectedFiles;
|
||||
IncludeUntracked = true;
|
||||
OnlyStaged = false;
|
||||
KeepIndex = false;
|
||||
|
||||
View = new Views.StashChanges() { DataContext = this };
|
||||
}
|
||||
|
@ -63,7 +70,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Stash(_repo.FullPath).Push(jobs, Message, !HasSelectedFiles && OnlyStaged);
|
||||
var succ = new Commands.Stash(_repo.FullPath).Push(jobs, Message, !HasSelectedFiles && OnlyStaged, KeepIndex);
|
||||
CallUIThread(() =>
|
||||
{
|
||||
_repo.MarkWorkingCopyDirtyManually();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue