git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] rebase: support --trailer and add --reviewby
@ 2025-05-06 12:57 Li Chen
  2025-05-06 12:58 ` [RFC PATCH 1/2] rebase, am: add --reviewby option Li Chen
  2025-05-06 12:58 ` [RFC PATCH 2/2] rebase: support --trailer Li Chen
  0 siblings, 2 replies; 16+ messages in thread
From: Li Chen @ 2025-05-06 12:57 UTC (permalink / raw)
  To: git

From: Li Chen <chenl311@chinatelecom.cn>

This patch series enhances `git rebase` and `git am` by introducing three features:

 1. `--trailer <line>` support on rebase's merge backend
    Allows arbitrary trailer lines (e.g. multiple “Reviewed-by: …”) to be appended
    to each rebased commit.  The apply backend (`git am`) is explicitly
    rejected when used with `--trailer`, since it has no message‑filter/trailer support.

    This is especially useful when reviewee add reviewer's Reviewed-by, e.g.,
    git rebase \
    --trailer "Reviewed-by: Bob <bob@example.com>" \
    --trailer "Tested-by: Dana <dana@example.com>" \
    base~1


 2. `--reviewby` shortcut flag for rebase
    A convenience alias for adding a single “Reviewed‑by:” trailer using your configured
    committer identity (user.name/user.email), analogous to --signoff. It works on both
    rebase backends (merge and apply) and automatically disables fast‑forwarding to
    rewrite commits.

    This is especially useful when reviewer adds his/her Reviewed-by for a given patchset
    which is already applied, e.g., git rebase --reviewby base~1

3. BTW, `--reviewby` shortcut flag is also added for `am` cmd, because it's needed
   by rebase's apply backend.

I’ve run make test locally without failures. There are Github CI errors around leak checks that I’m still tracking down (see https://github.com/FirstLoveLife/git/actions/runs/14859027869).

Looking forward to your feedback!

Li Chen (2):
  rebase, am: add --reviewby option
  rebase: support --trailer

 Documentation/git-am.adoc  |   6 +-
 builtin/am.c               |  31 +++++++++
 builtin/rebase.c           |  84 ++++++++++++++++++++++
 builtin/revert.c           |   4 +-
 sequencer.c                | 100 ++++++++++++++++++++++++++-
 sequencer.h                |  12 ++++
 t/meson.build              |   2 +
 t/t3439-rebase-reviewby.sh | 138 +++++++++++++++++++++++++++++++++++++
 t/t3440-rebase-trailer.sh  | 108 +++++++++++++++++++++++++++++
 t/t4150-am.sh              |  75 ++++++++++++++++++++
 10 files changed, 556 insertions(+), 4 deletions(-)
 create mode 100755 t/t3439-rebase-reviewby.sh
 create mode 100755 t/t3440-rebase-trailer.sh

--
2.49.0


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

end of thread, other threads:[~2025-05-16 10:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 12:57 [RFC PATCH 0/2] rebase: support --trailer and add --reviewby Li Chen
2025-05-06 12:58 ` [RFC PATCH 1/2] rebase, am: add --reviewby option Li Chen
2025-05-06 18:07   ` Junio C Hamano
2025-05-07  6:46     ` Li Chen
2025-05-07 10:17       ` Phillip Wood
2025-05-07 10:26         ` Phillip Wood
2025-05-07 10:39           ` Kristoffer Haugsbakk
2025-05-07 13:38             ` Phillip Wood
2025-05-07 17:39         ` Junio C Hamano
2025-05-06 12:58 ` [RFC PATCH 2/2] rebase: support --trailer Li Chen
2025-05-08 14:17   ` Phillip Wood
2025-05-08 15:55     ` Li Chen
2025-05-08 15:58       ` phillip.wood123
2025-05-08 16:29       ` Phillip Wood
2025-05-16  5:42     ` Li Chen
2025-05-16 10:04       ` Phillip Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).