From: Shawn Pearce <spearce@spearce.org>
To: Andy Parkins <andyparkins@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Trim hint printed when gecos is empty.
Date: Tue, 28 Nov 2006 10:31:44 -0500 [thread overview]
Message-ID: <20061128153144.GB28337@spearce.org> (raw)
In-Reply-To: <200611281506.53518.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> wrote:
> > So I will never need something like you suggest. Having said that, if you
> > think it is best for you to mark every commit as signed-off-by you, just
> > add an alias:
> >
> > git repo-config --global alias.c "commit -s"
>
> That requires that I introduce a new command; I want the existing command to
> do The Right Thing. Also; I certainly wouldn't want it global, as I said in
> my original message - this is a per-project choice. Some projects don't have
> Signed-Off lines, so there is no point there.
>
> Ideally, I'd be able to do
> git repo-config alias.commit "commit -s"
> Just as I can with shell commands.
Long ago we decided that aliasing over shipped commands was a baaaad
idea, as it might get a shell script into trouble when all of a
sudden the "-s" option is being given to every commit invocation.
But you can install a commit-msg hook (.git/hooks/commit-msg)
in any project you want to ensure a Signed-off-by line is in the
commit message for. Its handed the COMMIT_EDITMSG file, which is
what the message will be generated from. Looking at the code for
git-commit.sh its perfectly OK if the hook edits the file too.
Further the hook could be interactive, prompting the user "are
you sure you don't want to sign this commit?" or can be skipped by
handing --no-verify to commit.
I just learned about commit-msg hook the other day when I was reading
through git-commit.sh and noticed I didn't implement invoking that
particular hook in git-gui...
--
next prev parent reply other threads:[~2006-11-28 15:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 10:27 [PATCH] Trim hint printed when gecos is empty Han-Wen Nienhuys
2006-11-28 10:52 ` Han-Wen Nienhuys
2006-11-28 11:15 ` Jakub Narebski
2006-11-28 11:46 ` Andy Parkins
2006-11-28 13:28 ` Johannes Schindelin
2006-11-28 14:03 ` Andy Parkins
2006-11-28 14:40 ` Johannes Schindelin
2006-11-28 15:06 ` Andy Parkins
2006-11-28 15:31 ` Shawn Pearce [this message]
2006-11-28 18:29 ` Junio C Hamano
2006-11-29 9:29 ` Johannes Schindelin
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=20061128153144.GB28337@spearce.org \
--to=spearce@spearce.org \
--cc=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/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.