Download raw body.
No-op histedit scripts
On Tue, May 30, 2023 at 05:10:19PM +0200, Christian Weisgerber wrote: > Let's say I start "histedit" and get the default all-pick template > in the editor. Oh no, I picked a bad starting point, the commit I > wanted to change isn't even in there. So I quit the editor without > touching the script... and histedit proceeds to execute it. No > harm done, I guess, but nothing accomplished either. > > Should histedit simply do nothing if the script hasn't been touched? > Should it fast-forward to the tip? Would this interact poorly with > anything? I have noticed this as well occasionally. It hasn't bothered me, and there will be a histedit backup which can be used to revert any effects of such "no-op" histedits if desired. There is one use case I can think of where this behaviour is useful. If you made commits with the wrong $GOT_AUTHOR info and fix $GOT_AUTHOR in the environment you can then use got histedit in this way to have the rewritten commits use the updated $GOT_AUTHOR value. If $GOT_AUTHOR remains the same then only thing which changes is timestamps of commits. That by itself is not useful, but strictly speaking it is not a "no-op" either.
No-op histedit scripts