Re: [RFC PATCH 1/2] rebase, am: add --reviewby option
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- May 7, 2025, 10:39 UTC
- Message-ID
- <fdf7a827-d8ca-4edc-8427-a2c6eb470e1a@app.fastmail.com>
- In-Reply-To
- <0c4721c6-9ca9-41b4-a2aa-39f521d66426@gmail.com>
On Wed, May 7, 2025, at 12:26, Phillip Wood wrote:
Show 31 quoted lines
> On 07/05/2025 11:17, Phillip Wood wrote: >> Hi Li >> >> On 07/05/2025 07:46, Li Chen wrote: >>> >>> Some projects require every commit to carry a Reviewed-by: line >>> for accountability, much like the kernel requires Signed-off-by:. >>> A first‑class option keeps that workflow “out of the box”; otherwise >>> people need to define an alias such as >>> >>> [alias] >>> rbr = rebase --trailer "Reviewed-by: $GIT_AUTHOR_NAME >>> <$GIT_AUTHOR_EMAIL>" >>> >>> which is functional but less convenient. >>> >>> I would appreciate your further thoughts on whether a dedicated >>> flag(--reviewby) is acceptable, or whether we should drop it and rely >>> solely on >>> the generic --trailer interface. >> >> I think adding support for --trailer is a good idea and if we do that we >> don't need --reviewby. The existence and implementation of --signoff is >> largely a historical artifact - I'm not sure we'd make the same choices >> if we were thinking about adding it today. Different projects have >> different requirements and I don't think it is sensible to add a new >> option catering to the different demands of each project. > > It might be worth thinking about how we could extend the trailer option > so that it uses the committer identity if there is no value specified > which would reduce the pain of adding things like Reviewed-by:
That could be confusing for people who use trailers for non-ident metadata.
I was wondering if `git var GIT_COMMITTER_IDENT` could be used. But that prints a Unix timestamp with timezone as well. (I don’t really understand why after reading that part of the manual)
-- Kristoffer Haugsbakk