public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add a config option to add a comment to S-o-b lines
Date: Fri, 20 Mar 2026 15:36:09 -0700	[thread overview]
Message-ID: <xmqq7br6dt7q.fsf@gitster.g> (raw)
In-Reply-To: <xmqq341ufn12.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 20 Mar 2026 10:06:49 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Uwe Kleine-König <u.kleine-koenig@baylibre.com> writes:
>
>> As an employee of a consultant company I'm often requested to mention
>> the customer name in the Signed-off-by line. Add a config knob
>> "user.signoffcomment" to configure this and use it in automatically
>> generated S-o-b lines.
>>
>> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>> ---
>
> I know it is not the thrust of this patch, but I think you should
> think about this question at the same time, eh, rather, I do not
> think we want to add a feature like this without thinking things
> like the following through:
>
> How should this practice interact with commands like "git log
> --author=", "git shortlog", and friends?
>
> Would projects accepting contributions signed like so want to have a
> feature to easily strip the comments without having to add new
> entries to their .mailmap every time a known contributor works for a
> new client?
>
> And then there is a question of "what shape of comment do we want?
> is it OK for us to dictate that it comes after the author's human
> readable name identity enclosed in parentheses?".
>
> Shouldn't interpret-trailers be a good place to do this, instead of
> a configuration option?

Another tangent.  Stepping back a bit, these names and e-mail
addresses come from:

    [user]
	name = Uwe Kleine-König
	email = u.kleine-koenig@...

It is plausible that a single user may want to use different
identities depending on where the identities are used.  It may take
a form of three-level configuration variable name, i.e.,

    user.<context>.name
    user.<context>.email

where obvious candidates for <context> are things like "author"
(used for commit author ident), "committer", and "tagger".

It is not too inconceivable to have an entry dedicated for
"sign-off", perhaps in addition to the above user.{name,email}
entries you already have in your $HOME/.gitconfig, you may throw
something like this in the project .git/config file:

    [user "sign-off"]
	name = Uwe Kleine-König (Current Sponsor)

ident.c::fmt_ident() and ident.c::fmt_name() take "enum want_ident"
that lets our callers say "I want AUTHOR_IDENT" etc., and it would
be natural to extend the set of WANT_*_IDENT enumeration to support
more kind of names, if we really wanted to.

Having said that, wishing to be known under different identities to
different communities is one thing, but I am not yet convinced that
it is a good idea to use different identities in a single project
depending where the ident appears.

Thanks.



      reply	other threads:[~2026-03-20 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 10:28 [PATCH] Add a config option to add a comment to S-o-b lines Uwe Kleine-König
2026-03-20 11:00 ` Kristoffer Haugsbakk
2026-03-20 17:06 ` Junio C Hamano
2026-03-20 22:36   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq7br6dt7q.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox