mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
enhance: do not call git add
before git stash push
when enable auto stash in checkout/create branch/pull (#316)
This commit is contained in:
parent
6c5175704e
commit
71c2ad989b
4 changed files with 8 additions and 32 deletions
|
@ -36,14 +36,8 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
||||||
{
|
{
|
||||||
SetProgressDescription("Adding untracked changes ...");
|
SetProgressDescription("Stash local changes ...");
|
||||||
var succ = new Commands.Add(_repo.FullPath).Exec();
|
var succ = new Commands.Stash(_repo.FullPath).Push("CHECKOUT_AUTO_STASH");
|
||||||
if (succ)
|
|
||||||
{
|
|
||||||
SetProgressDescription("Stash local changes ...");
|
|
||||||
succ = new Commands.Stash(_repo.FullPath).Push("CHECKOUT_AUTO_STASH");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!succ)
|
if (!succ)
|
||||||
{
|
{
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
|
|
|
@ -40,14 +40,8 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (AutoStash)
|
if (AutoStash)
|
||||||
{
|
{
|
||||||
SetProgressDescription("Adding untracked changes ...");
|
SetProgressDescription("Stash local changes ...");
|
||||||
var succ = new Commands.Add(_repo.FullPath).Exec();
|
var succ = new Commands.Stash(_repo.FullPath).Push("CHECKOUT_AUTO_STASH");
|
||||||
if (succ)
|
|
||||||
{
|
|
||||||
SetProgressDescription("Stash local changes ...");
|
|
||||||
succ = new Commands.Stash(_repo.FullPath).Push("CHECKOUT_AUTO_STASH");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!succ)
|
if (!succ)
|
||||||
{
|
{
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
|
|
|
@ -91,14 +91,8 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
||||||
{
|
{
|
||||||
SetProgressDescription("Adding untracked changes...");
|
SetProgressDescription("Stash local changes");
|
||||||
var succ = new Commands.Add(_repo.FullPath).Exec();
|
var succ = new Commands.Stash(_repo.FullPath).Push("CREATE_BRANCH_AUTO_STASH");
|
||||||
if (succ)
|
|
||||||
{
|
|
||||||
SetProgressDescription("Stash local changes");
|
|
||||||
succ = new Commands.Stash(_repo.FullPath).Push("CREATE_BRANCH_AUTO_STASH");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!succ)
|
if (!succ)
|
||||||
{
|
{
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
|
|
|
@ -134,14 +134,8 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
if (PreAction == Models.DealWithLocalChanges.StashAndReaply)
|
||||||
{
|
{
|
||||||
SetProgressDescription("Adding untracked changes...");
|
SetProgressDescription("Stash local changes...");
|
||||||
var succ = new Commands.Add(_repo.FullPath).Exec();
|
var succ = new Commands.Stash(_repo.FullPath).Push("PULL_AUTO_STASH");
|
||||||
if (succ)
|
|
||||||
{
|
|
||||||
SetProgressDescription("Stash local changes...");
|
|
||||||
succ = new Commands.Stash(_repo.FullPath).Push("PULL_AUTO_STASH");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!succ)
|
if (!succ)
|
||||||
{
|
{
|
||||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||||
|
|
Loading…
Reference in a new issue