Skip to content

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

Open
@fmorroni

Description

@fmorroni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions