mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-28 23:54:59 +00:00
fix<Stash>: fix stash failed when there's too many files to be stashed
This commit is contained in:
parent
905531f2db
commit
ccb3c07064
4 changed files with 53 additions and 31 deletions
|
@ -67,7 +67,7 @@ namespace SourceGit.Views.Popups {
|
|||
var changes = new Commands.LocalChanges(repo).Result();
|
||||
if (changes.Count > 0) {
|
||||
if (AutoStash) {
|
||||
if (!new Commands.Stash(repo).Push(changes, "NEWBRANCH_AUTO_STASH")) {
|
||||
if (!new Commands.Stash(repo).Push(changes, "NEWBRANCH_AUTO_STASH", true)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,8 @@ namespace SourceGit.Views.Popups {
|
|||
return Task.Run(() => {
|
||||
Models.Watcher.SetEnabled(repo, false);
|
||||
|
||||
if (changes == null || changes.Count == 0) {
|
||||
var bFull = changes == null || changes.Count == 0;
|
||||
if (bFull) {
|
||||
changes = new Commands.LocalChanges(repo).Result();
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ namespace SourceGit.Views.Popups {
|
|||
}
|
||||
}
|
||||
|
||||
if (jobs.Count > 0) new Commands.Stash(repo).Push(changes, message);
|
||||
if (jobs.Count > 0) new Commands.Stash(repo).Push(changes, message, bFull);
|
||||
Models.Watcher.SetEnabled(repo, true);
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue