mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-28 23:54:59 +00:00
fix<Discard>: fix discard with files not only dropped changes selected but also others
This commit is contained in:
parent
30ab8ae954
commit
8f3c2fdc32
4 changed files with 47 additions and 20 deletions
|
@ -33,7 +33,12 @@ namespace SourceGit.Views.Popups {
|
|||
public override Task<bool> Start() {
|
||||
return Task.Run(() => {
|
||||
Models.Watcher.SetEnabled(repo, false);
|
||||
new Commands.Discard(repo, changes).Exec();
|
||||
var cmd = new Commands.Discard(repo);
|
||||
if (changes == null || changes.Count == 0) {
|
||||
cmd.Whole();
|
||||
} else {
|
||||
cmd.Changes(changes);
|
||||
}
|
||||
Models.Watcher.SetEnabled(repo, true);
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue