-
Notifications
You must be signed in to change notification settings - Fork 294
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Why Do Nothing is removed
The Do Nothing was introduced by issue #143, which pointed out that it is unnecessary to use Stash & Re-apply when there are only untracked files.
Currently, SourceGit will check this automatically. For example, before running git checkout:
sourcegit/src/ViewModels/Checkout.cs
Lines 33 to 54 in 67f4330
| var changes = new Commands.CountLocalChangesWithoutUntracked(_repo.FullPath).Result(); | |
| var needPopStash = false; | |
| if (changes > 0) | |
| { | |
| if (DiscardLocalChanges) | |
| { | |
| SetProgressDescription("Discard local changes ..."); | |
| Commands.Discard.All(_repo.FullPath, false); | |
| } | |
| else | |
| { | |
| SetProgressDescription("Stash local changes ..."); | |
| var succ = new Commands.Stash(_repo.FullPath).Push("CHECKOUT_AUTO_STASH"); | |
| if (!succ) | |
| { | |
| CallUIThread(() => _repo.SetWatcherEnabled(true)); | |
| return false; | |
| } | |
| needPopStash = true; | |
| } | |
| } |
Why SourceGit stops to remember the last selected handling method of uncommitted local changes
Since the situation I was worried about still occurred, I decided to roll back this feature.
- Applying the same operation to local change each time is not the correct way.
- Users are likely to mis-operate without noticing.
- After local unstaged and unstashed changes are wrongly deleted, there is no way to recover them. This is a very serious matter.
See #977
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation