Skip to content

git stash pop is executed when it should not be #85

@dank-openai

Description

@dank-openai

I run a command like stack-pr export -B HEAD~2~4 -H HEAD~2 and it works (e.g. it pushes changes and creates & updates PRs) right up until the end, when it needlessly performs git stash pop:

SUCCESS!
Running: ['git', 'stash', 'pop']
Auto-merging <some file>
CONFLICT (content): Merge conflict in <some file>

This is wrong. There was no reason to git stash pop. Furthermore, my git stash has some things that I placed there, which cause a merge conflict (as seen above).

What I notice is that near the beginning of the command's execution is:

Running: ['git', 'stash', 'save']
No local changes to save

Solution: when any command (such as export) performs stash, it must pay attention to the stash save result. If no changes were saved, then it must not later stash pop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions