squash -i squashes things I didn't expect #4722
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It's not clear to me what's going on. Perhaps you meant to squash from You could use It's also possible that you're seeing a bug having to do with the built-in diff editor or If you .tar.gz the entire repo, we might be able to help looking at the operation log (though I can't promise to do it immediately). |
Beta Was this translation helpful? Give feedback.
I didn't follow all you wrote here (yet, sorry about that), but I'm wondering if the problem is that the squash command doesn't do quite what you think it does. In particular, I'm responding (perhaps too quickly) to your statement that "So I'd expect it to work the same from both changes", which is wrong (in general, at least).
Let's say we have this tree:
Then,
jj restore --from Y --to B
would setfile
to 2 in B, as one would probably expect.However,
jj squash --from Y --to B
is quite different. In this case, it would not do anything. This is becauseY
is an "empty commit"; its diff relative to its parent is empty.jj squash
…