Re: [RFC PATCH 2/2] rebase: support --trailer
- From
Li Chen <me@linux.beauty>
- Date
- May 16, 2025, 05:42 UTC
- Message-ID
- <196d79d922d.127d7eb7f870411.3309775784450179401@linux.beauty>
- In-Reply-To
- <951d3343-fe97-4e7e-bb73-1c569ff10ee6@gmail.com>
Hi Phillip,
---- On Thu, 08 May 2025 22:17:17 +0800 Phillip Wood <phillip.wood123@gmail.com> wrote --- > Hi Li > > On 06/05/2025 13:58, Li Chen wrote: > > From: Li Chen <chenl311@chinatelecom.cn> > > > > Implement a new `--trailer <text>` option for `git rebase` > > (support merge backend only now), which appends arbitrary > > trailer lines to each rebased commit message. Reject early > > if used with the apply backend (git am) since it lacks > > message‑filter/trailer hook. Automatically set REBASE_FORCE when > > any trailer is supplied. > > I think this is a reasonable idea but unfortunately I think the trailer > API needs improving so that the implementation > > (a) ... > > (b) ... > > (c) Only adds the trailers on the commandline. I'm a bit confused by the > various trailer config options - the man page reads to me like "git > interpret-trailers" can add missing trailers that are configured but not > passed on the commandline.
About part (c), just to be sure I understand correctly:
Do you want the trailer implementation to completely drop any handling of trailer configuration (i.e. remove parse_trailers_from_config() and related config-based behavior from the codepath and man page/documents)?
Or would you rather leave the config machinery in place, but have rebase --trailer explicitly ignore all trailer.* configuration and only append the exact trailers passed on its command line?
Please let me know which you prefer (or if there’s a third path I’m missing) and I’ll add the patches accordingly.
Regards, Li