stgit icon indicating copy to clipboard operation
stgit copied to clipboard

`stg rebase` does not handle conflicts well

Open neuschaefer opened this issue 2 years ago • 3 comments

When stg rebase encounters a merge conflict, it stops (which is fine by itself, because a conflict requires manual intervention). With stg push instead of stg rebase it is possible to resolve the conflict, mark it as resolved with git add -u, and commit with stg refresh. I vaguely remember that this was at one point also possible with stg rebase. Now, however, it fails and I'm left in a messy state:

$ stg ref
Error: HEAD and top are not the same.
       This can happen if you modify a branch with git.
       "stg repair --help" explains more about what to do next.
stg refresh: Command aborted (all changes rolled back)

Version information

$ stg --version
git version 2.35.1
Python 3.10.6
Stacked Git 1.5

neuschaefer avatar Sep 11 '22 16:09 neuschaefer

Thanks for this issue report, @neuschaefer. However, I've stopped working on StGit 1.x with all my effort going toward the upcoming 2.0 release. It would be helpful to know if remains an issue in 2.0. If you could try your use case with either the 2.0.0-beta.3 release or with HEAD of the master branch, that would be greatly appreciated.

jpgrayson avatar Sep 12 '22 16:09 jpgrayson

Fair enough, I'll test with the 2.0 branch

EDIT: Embarrassingly, I can't seem to reproduce the issue under stg 1.5 anymore (where it certainly happened was 0.19, and I had installed 1.5 for testing)… It might take me a while to give a conclusive answer.

neuschaefer avatar Sep 14 '22 16:09 neuschaefer

Can this be closed? Seems like it. I just tried this on stgit 2.4.6, and it worked fine.

(I'm migrating to stgit 2 myself, and going through open bugs to get a sense of state of stgit. This one had a scary subject line.)

palves avatar Apr 19 '24 22:04 palves