On 2023-01-20 3:22 am, Jean Abou Samra wrote:
Rewriting history is just something that one might not be used to
coming
from other projects, but perfectly fine for our purposes.
It was impressed upon me to treat rewriting history as fraught with
peril, potentially even Bad(tm) in the Ghostbusters sense:
"Try to imagine all life as you know it stopping instantaneously and
every molecule in your body exploding at the speed of light." --
Egon Spengler
One might argue that anything in your development branch is not really
part of "history" yet as it has not been accepted. (The situation gets
murkier when people are forking forks.) As such, it *should* be safe to
mess about with commits to clean up typos or catch missing files, what
have you. And I would agree this results in a cleaner submission that
is easier to review for correctness. (I probably should clarify my
earlier comments that I do not intentionally make my commits messy, just
that I usually do not stress about them being so absolutely pristine;
again, I am used to work being squashed, so any niceness I put in there
gets lost.)
So I can see --amend being useful for the little things. But let's say
during a review, it is determined that the scope could increase to cover
more items than originally planned but that still feels part of the same
submission. (Anything too distinct really should be an independent
request.) Now, you might not necessarily want to force all of the new
development work into the existing commit. Reviewers might even
appreciate seeing the individual slices of the task more cleanly
delineated. In a sense, there is some "history" to the process that
might be worth preserving during this stage.
-- Aaron Hill