Files
git/builtin
Patrick Steinhardt 4deb389894 builtin/history: implement "drop" subcommand
A common operation when editing the commit history is to drop a specific
commit from the history entirely, but this operation is not currently
covered by git-history(1).

A couple of noteworthy bits:

  - This is the first git-history(1) command that will ultimately result
    in changes to both the index and the working tree. We thus have to
    add logic to merge resulting changes into those.

  - It is still not possible to replay merge commits, so this limitation
    is inherited for the new "drop" command.

  - For now we refuse to drop root commits. While we _can_ indeed drop
    root commits in the general case, there are edge cases where the
    resulting history would become completely empty. This is thus left
    to a subsequent patch series.

Other than that, most of the logic is rather straight-forward as we can
continue to build on the preexisting logic in git-history(1) for most of
the part.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-11 10:48:53 -07:00
..
2026-04-10 07:58:53 -07:00
2026-04-08 10:19:17 -07:00
2026-05-27 14:15:44 +09:00
2026-03-23 08:33:10 -07:00
2026-03-23 08:33:10 -07:00
2026-03-31 20:43:14 -07:00
2026-02-20 08:13:58 -08:00
2026-03-31 20:43:14 -07:00
2026-03-24 12:31:31 -07:00
2026-05-06 09:48:28 +09:00
2026-04-10 07:58:53 -07:00