public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] history: introduce "split" subcommand
@ 2026-03-02 12:13 Patrick Steinhardt
  2026-03-02 12:13 ` [PATCH 1/8] add-patch: split out header from "add-interactive.h" Patrick Steinhardt
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Patrick Steinhardt @ 2026-03-02 12:13 UTC (permalink / raw)
  To: git; +Cc: Elijah Newren

Hi,

this patch series introduces `git history split` as an easy way to split
up one commit into multiple commits. This subcommand has already been
introduced in earlier versions of my git-history(1) patch series, but I
eventually decided to evict them from this series so that we can rather
focus more on basic decisions.

In any case, the current version of this patch series matches (to the
best of my knowledge) the latest agreements on the mailing list around
its behaviour. Most importantly:

  - It will ask for commit messages for both commits, not only the first
    commit, which has been a bit of a discussion point.

  - It is not possible to edit hunks. This results in a mode where
    conflicts are not possible as the tree of the second commit will
    always match the tree of the original commit. Conflict handling for
    subsequent subcommands will be a bigger topic, as it probably
    depends on support for first-class conflicts.

  - We also update dependent branches, same as with the latest iteration
    of `git history reword`.

The patch series is built on top of 2cc7191751 (The 8th batch,
2026-02-27) with aa/add-p-no-auto-advance at 417b181f99 (add-patch:
allow interfile navigation when selecting hunks, 2026-02-14) merged into
it.

Thanks!

Patrick

---
Patrick Steinhardt (8):
      add-patch: split out header from "add-interactive.h"
      add-patch: split out `struct interactive_options`
      add-patch: remove dependency on "add-interactive" subsystem
      add-patch: add support for in-memory index patching
      add-patch: allow disabling editing of hunks
      cache-tree: allow writing in-memory index as tree
      builtin/history: split out extended function to create commits
      builtin/history: implement "split" subcommand

 Documentation/git-history.adoc |  62 ++++
 add-interactive.c              | 177 ++--------
 add-interactive.h              |  48 +--
 add-patch.c                    | 363 ++++++++++++++++----
 add-patch.h                    |  74 ++++
 builtin/add.c                  |  26 +-
 builtin/checkout.c             |   9 +-
 builtin/commit.c               |  16 +-
 builtin/history.c              | 317 +++++++++++++++--
 builtin/reset.c                |  20 +-
 builtin/stash.c                |  54 +--
 cache-tree.c                   |   4 +-
 cache-tree.h                   |   3 +-
 commit.h                       |   2 +-
 t/meson.build                  |   1 +
 t/t3452-history-split.sh       | 757 +++++++++++++++++++++++++++++++++++++++++
 16 files changed, 1592 insertions(+), 341 deletions(-)


---
base-commit: caec355702b7a86dadec53344ba65ae33558cfa8
change-id: 20260202-pks-history-split-fb3a93df61ba


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-03-16  7:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 12:13 [PATCH 0/8] history: introduce "split" subcommand Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 1/8] add-patch: split out header from "add-interactive.h" Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 2/8] add-patch: split out `struct interactive_options` Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 3/8] add-patch: remove dependency on "add-interactive" subsystem Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 4/8] add-patch: add support for in-memory index patching Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 5/8] add-patch: allow disabling editing of hunks Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 6/8] cache-tree: allow writing in-memory index as tree Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 7/8] builtin/history: split out extended function to create commits Patrick Steinhardt
2026-03-03 18:43   ` D. Ben Knoble
2026-03-11  9:26     ` Patrick Steinhardt
2026-03-02 12:13 ` [PATCH 8/8] builtin/history: implement "split" subcommand Patrick Steinhardt
2026-03-03 18:47   ` D. Ben Knoble
2026-03-11  9:26     ` Patrick Steinhardt
2026-03-03 18:41 ` [PATCH 0/8] history: introduce " D. Ben Knoble
2026-03-13 22:35 ` Junio C Hamano
2026-03-16  7:13   ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox