git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v8 00/11] builtin/history: introduce "drop" subcommand

From
Christian Couder <christian.couder@gmail.com>
Date
Jul 3, 2026, 07:10 UTC
Message-ID
<CAP8UFD3OAktVQsLuqBNFH2uhEO31PH8ZF3ZT1ZW8k++XE8YLPw@mail.gmail.com>
In-Reply-To
<20260701-b4-pks-history-drop-v8-0-19b5cdf1facd@pks.im>
On Wed, Jul 1, 2026 at 1:35 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 16 quoted lines
>
> Hi,
>
> this small patch series introduces the new "drop" subcommand for
> git-history(1). As a reader might guess, the command does exactly that:
> given a commit, it will drop that commit from the commit history and
> replay descendant branches on top of it.
>
> Changes in v8:
>   - Pass `RESOLVE_REF_READING` to make `refs_resolve_ref_unsafe()`
>     return a NULL pointer when it cannot resolve the reference.
>   - Drop unneeded code that sets `head_target = "HEAD"` on detached
>     HEAD.
>   - Add a test case that verifies that we can drop commits with
>     "--update-refs=head" and a detached HEAD.
>   - Link to v7: https://patch.msgid.link/20260629-b4-pks-history-drop-v7-0-6e9392a957d8@pks.im

Except for the style nit in patch 6 (spurious space character), this series looks good to me.

Thanks.
Previous: Junio C HamanoNext: Junio C Hamano
Message 17 of 18 in “builtin/history: introduce "drop" subcommand”
  1. 00/11 builtin/history: introduce "drop" subcommandPatrick Steinhardt, Jul 1, 2026
  2. 01/11 read-cache: split out function to drop unmerged entries to stage 0Patrick Steinhardt, Jul 1, 2026
  3. 02/11 reset: drop `USE_THE_REPOSITORY_VARIABLE`Patrick Steinhardt, Jul 1, 2026
  4. 03/11 reset: rename `reset_head()`Patrick Steinhardt, Jul 1, 2026
  5. 04/11 reset: modernize flags passed to `reset_working_tree()`Patrick Steinhardt, Jul 1, 2026
  6. 05/11 reset: introduce dry-run modePatrick Steinhardt, Jul 1, 2026
  7. 06/11 reset: introduce ability to skip updating HEADPatrick Steinhardt, Jul 1, 2026
  8. Christian CouderJul 3, 2026
  9. Patrick SteinhardtJul 3, 2026
  10. Junio C HamanoJul 3, 2026
  11. 07/11 reset: allow the caller to specify the current HEAD objectPatrick Steinhardt, Jul 1, 2026
  12. 08/11 reset: stop assuming that the caller passes in a clean indexPatrick Steinhardt, Jul 1, 2026
  13. 09/11 replay: expose `replay_result_queue_update()`Patrick Steinhardt, Jul 1, 2026
  14. 10/11 builtin/history: split handling of ref updates into two phasesPatrick Steinhardt, Jul 1, 2026
  15. 11/11 builtin/history: implement "drop" subcommandPatrick Steinhardt, Jul 1, 2026
  16. Junio C HamanoJul 1, 2026
  17. Christian CouderJul 3, 2026
  18. Junio C HamanoJul 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.