Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fmorroni opened this issue Sep 28, 2024 · 3 comments · May be fixed by #2382
Open

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

fmorroni opened this issue Sep 28, 2024 · 3 comments · May be fixed by #2382
Labels
bug Something isn't working

Comments

@fmorroni
Copy link

fmorroni commented Sep 28, 2024

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 fmorroni added the bug Something isn't working label Sep 28, 2024
@wugeer
Copy link
Contributor

wugeer commented Sep 30, 2024

@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
Copy link
Author

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

@wugeer
Copy link
Contributor

wugeer commented Sep 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants