mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
optimize<WorkingCopyChanges>: run as stage/unstage all if all changes selected
This commit is contained in:
parent
cd934349aa
commit
de75f5010b
1 changed files with 2 additions and 2 deletions
|
@ -371,7 +371,7 @@ namespace SourceGit.Views.Widgets {
|
|||
private async void DoStage(List<string> files) {
|
||||
IsStaging = true;
|
||||
Models.Watcher.SetEnabled(repo, false);
|
||||
if (files == null || files.Count == 0) {
|
||||
if (files == null || files.Count == 0 || files.Count == Changes.Count) {
|
||||
await Task.Run(() => new Commands.Add(repo).Exec());
|
||||
} else {
|
||||
for (int i = 0; i < files.Count; i += 10) {
|
||||
|
@ -709,7 +709,7 @@ namespace SourceGit.Views.Widgets {
|
|||
#region STAGED
|
||||
private async void DoUnstage(List<string> files) {
|
||||
Models.Watcher.SetEnabled(repo, false);
|
||||
if (files == null || files.Count == 0) {
|
||||
if (files == null || files.Count == 0 || files.Count == Changes.Count) {
|
||||
await Task.Run(() => new Commands.Reset(repo).Exec());
|
||||
} else {
|
||||
for (int i = 0; i < files.Count; i += 10) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue