extrawurst / gitui

Blazing 💥 fast terminal-ui for git written in rust 🦀
MIT License
18.37k stars 564 forks source link

Stash pop removes stash from list even when there are conflicts #2372

Open fmorroni opened 1 week ago

fmorroni commented 1 week ago

Describe the bug Stashes are removed from the stash list when popped even if there are conflicts. This is different from the git standard. From git stash documentation:

pop [--index] [-q|--quiet] [\] ... Applying the state can fail with conflicts; in this case, it is not removed from the stash list.

To Reproduce Steps to reproduce the behavior:

  1. Stash some changes.
  2. Make some changes to a file that will cause conflicts with the stash.
  3. Commit the changes.
  4. Pop the stash.
  5. Stash is applied and removed from the list.

Expected behavior Stash should be applied but not removed in case of conflicts.

Context:

wugeer commented 1 week ago

@fmorroni I can't reproduce your issue, there is something wrong? Here are the steps I followed. 录屏 2024-09-30 09-26-37.webm image

fmorroni commented 1 week ago

@wugeer my bad, the instructions were wrong. You should actually commit the changes that cause the conflict and then pop the stash.

wugeer commented 1 week ago

@fmorroni Indeed, the issue you mentioned is occurring here. I will try to resolve it. :) image