Thanks to everyone who commented on v1. I've squashed the fixups that
Junio had in "seen", squashed patches 8 & 9 together as suggested by
Oswald and expanded the commit message, and added Uwe's Tested-by:
trailer to the final patch. Oswald suggested extended the use of the
enum which I think is a good idea in the long-term but I punted on
that for now because I think it would be fairly invasive and this
series has enough refactoring in it already.
If a commit gets dropped because its changes are already upstream
then we should not record it as rewritten. As well as confusing any
post-rewrite hooks this means we end up copying the notes from the
dropped commit to the commit that was picked immediately before the
one that was dropped.
This series is structured as follows:
Patch 1 restores some test coverage that was lost when the default
rebase backend was changed.
Patch 2 moves a function so it can be called without a forward
declaration in Patch 11.
Patches 3 & 4 fix the return value of do_pick_commit() when an external
command fails (this is in preparation for patch 9).
Patches 5-8 try and simplify the control flow in pick_one_commit()
in preparation for patch 9.
Patch 9 changes the return type of do_pick_commit() to an enum.
Patch 10 adds a new member to the enum from patch 9 for commits that
are dropped when they become empty and uses that to stop them from
being recorded as rewritten.
base-commit: 6c3d7b73556db708feb3b16232fab1efc4353428
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Frebase-drop-notes-with-commit%2Fv2
View-Changes-At: https://github.com/phillipwood/git/compare/6c3d7b735...c89234dd9
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/rebase-drop-notes-with-commit/v2
Version: 2
Message-ID: <cover.1783948637.git.phillip.wood@dunelm.org.uk>
Submitted-As: https://lore.kernel.org/git/cover.1783948637.git.phillip.wood%40dunelm.org.uk