4 ms·
Ah a squashing of the top commit in a git rebase will touch the working tree more than necessary. But jj might just not do that?
by Ericson2314 1y ago
Ah a squashing of the top commit in a git rebase will touch the working tree more than necessary. But jj might just not do that?
- sfink 1y agoOh, I missed this part. I think jj is better here in at least one scenario. Specifically, I believe the scenario you're talking about is: change file1 build, producing binary.out squash the change down (leaving your working copy unmodified) rebuild If the squash updates the timestamp on file1, then the rebuild will redo the compilation steps that use file1 as input. When I test it out, it looks like doing a whole-file squash with jj does not update the timestamp. Hm... I guess even a partial squash doesn't update the current contents, let me try that too... yes, again jj does not touch the file nor update its timestamp. So it looks like it does do what you want, if I'm understanding things correctly.
- Ericson2314 1y agoYeah that makes sense!l. With git reset HEAD^ --soft, git commit --amend, git will do the same thing, but it won't bother to do that with rebases.