From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Taylor Blau <me@ttaylorr.com>, David Caro <dcaro@wikimedia.org>,
git@vger.kernel.org
Subject: Re: Skipping adding Signed-off-by even if it's not the last on git commit
Date: Thu, 8 Dec 2022 20:42:22 -0500 [thread overview]
Message-ID: <Y5KSfsxLO7com2f9@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqq5yel2wuv.fsf@gitster.g>
On Fri, Dec 09, 2022 at 10:23:52AM +0900, Junio C Hamano wrote:
> > ... The one exception is that the
> > generic trailer.ifExists, etc, would start affecting --signoff, which
> > _might_ be a surprise. If we wanted to retain the behavior there, we
> > could say "--signoff is special, and doesn't respect generic trailer
> > config".
>
> Yeah, that may be safe, however it is very unsatisfying.
Agreed. ;)
> > Alternatively, it would be nice if there was an easy way to put your
> > ident into a trailer (what I wrote above doesn't really work unless you
> > have those variables in your environment, and of course it's a lot of
> > typing). I think you can hack it up like:
> >
> > git config trailer.sign.key Signed-off-by
> > git config trailer.sign.cmd \
> > 'git var GIT_COMMITTER_IDENT | sed "s/>.*/>/";:'
> > git commit --trailer=sign
> >
> > which is only a little more typing than --signoff, but it's not very
> > ergonomic.
>
> It does not look _too_ bad, though.
What I don't like about it is:
- the external cmd is complicated and slow. It would be nice if you
could just set trailer.sign.ident=true or something, and it would
use your ident by default if no value is given (and maybe even do
completion similar to "commit --author" if a value is given).
- you have to know to be clever enough to define and use
--trailer=sign. If --signoff didn't exist, that's not too big a
stretch. But since it does, everyone will naturally reach for it
first.
The two could be solved independently, of course. And even if we did
want to solve both by making --signoff behave more like other trailers,
having trailer.*.ident might be nice in general.
I admit I just thought of this concept, though, so I don't have plans to
work up patches, and I make no claims there isn't a gotcha waiting
somewhere. ;)
-Peff
next prev parent reply other threads:[~2022-12-09 1:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 17:06 Skipping adding Signed-off-by even if it's not the last on git commit David Caro
2022-12-07 1:50 ` Taylor Blau
2022-12-07 4:11 ` Junio C Hamano
2022-12-07 8:40 ` David Caro
2022-12-07 22:13 ` Taylor Blau
2022-12-07 23:04 ` Junio C Hamano
2022-12-08 7:27 ` Jeff King
2022-12-09 1:23 ` Junio C Hamano
2022-12-09 1:42 ` Jeff King [this message]
2022-12-09 4:03 ` Junio C Hamano
2022-12-09 20:39 ` Jeff King
2022-12-07 4:31 ` Ævar Arnfjörð Bjarmason
2022-12-07 4:57 ` Junio C Hamano
2022-12-07 15:00 ` Konstantin Ryabitsev
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=Y5KSfsxLO7com2f9@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=dcaro@wikimedia.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.