gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Stash pop removes stash from list even when there are conflicts

Open fmorroni opened this issue 1 year ago • 3 comments

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] [<stash>] ... 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:

  • OS: Arch Linux x86_64 - Kernel: 6.10.10-arch1-1
  • gitui --version: gitui nightly 2024-09-12 (0f5cf89)
  • pacman -Qi gitui: 0.26.3-2
  • Rust version: 1.81.0

fmorroni avatar Sep 28 '24 02:09 fmorroni

@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

wugeer avatar Sep 30 '24 01:09 wugeer

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

fmorroni avatar Sep 30 '24 03:09 fmorroni

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

wugeer avatar Sep 30 '24 09:09 wugeer