It happens to me with some regularity while massaging large patch series via rebase.
The common pattern is that as a consequence of squashing, rebasing, and so on, an early patch in the series has a bug / compile error that is trivially fixed in the next patch in the series.
In those situation, you have to fix the first commit in a middle of a rebase, but keep the result _after_ the next patch the same. This can currently be done by making the change, immediately reverting it, and then squashing things together again. That is, before you have:
o -- A -- B
Then:
o -- A -- F -- F^{-1} -- B
Then you squash A and F and F^{-1} and B to get:
o -- A' -- B'
Having a more convenient way of doing such fixups would be nice, and I think being able to edit the index directly would help in some of them.
With Magit I wouldn't even need to do that. I would just snapshot the file * and continue changing it, then when I need the original version of it I would just pop it out off the stash.
The common pattern is that as a consequence of squashing, rebasing, and so on, an early patch in the series has a bug / compile error that is trivially fixed in the next patch in the series.
In those situation, you have to fix the first commit in a middle of a rebase, but keep the result _after_ the next patch the same. This can currently be done by making the change, immediately reverting it, and then squashing things together again. That is, before you have:
Then: Then you squash A and F and F^{-1} and B to get: Having a more convenient way of doing such fixups would be nice, and I think being able to edit the index directly would help in some of them.