git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/1] commit: add signoff config variable
@ 2019-08-03 19:34 Liam Beguin
  2019-08-03 21:11 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Liam Beguin @ 2019-08-03 19:34 UTC (permalink / raw)
  To: git; +Cc: Liam Beguin

Add a configuration variable, based on format.signoff, to automatically
signoff commit messages.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
---
 Documentation/config/commit.txt | 7 +++++++
 builtin/commit.c                | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/config/commit.txt b/Documentation/config/commit.txt
index 2c95573930be..62aaacb0dc74 100644
--- a/Documentation/config/commit.txt
+++ b/Documentation/config/commit.txt
@@ -27,3 +27,10 @@ commit.template::
 commit.verbose::
 	A boolean or int to specify the level of verbose with `git commit`.
 	See linkgit:git-commit[1].
+
+commit.signOff::
+	A boolean value which lets you enable the `-s/--signoff` option of
+	`git commit` by default. *Note:* Adding the Signed-off-by: line to a
+	patch should be a conscious act and means that you certify you have
+	the rights to submit this work under the same open source license.
+	Please see the 'SubmittingPatches' document for further discussion.
diff --git a/builtin/commit.c b/builtin/commit.c
index ae7aaf6dc683..36d70396ace7 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1456,6 +1456,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)
 		config_commit_verbose = git_config_bool_or_int(k, v, &is_bool);
 		return 0;
 	}
+	if (!strcmp(k, "commit.signoff")) {
+		signoff = git_config_bool(k, v);
+		return 0;
+	}
 
 	status = git_gpg_config(k, v, NULL);
 	if (status)
-- 
2.21.0.777.g83232e38648b


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] commit: add signoff config variable
  2019-08-03 19:34 [PATCH 1/1] commit: add signoff config variable Liam Beguin
@ 2019-08-03 21:11 ` brian m. carlson
  2019-08-03 21:23   ` Liam Beguin
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2019-08-03 21:11 UTC (permalink / raw)
  To: Liam Beguin; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

On 2019-08-03 at 19:34:36, Liam Beguin wrote:
> Add a configuration variable, based on format.signoff, to automatically
> signoff commit messages.
> 
> Signed-off-by: Liam Beguin <liambeguin@gmail.com>

This has been proposed several times. It may be interesting to look
through the history of the list and examine why it hasn't been accepted
as a feature. A few attempts are chronicled here:
https://public-inbox.org/git/?q=commit.signoff

This is, however, achievable with a commit-msg hook or using "git
interpret-trailers" if you are certain this is what you want to do.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] commit: add signoff config variable
  2019-08-03 21:11 ` brian m. carlson
@ 2019-08-03 21:23   ` Liam Beguin
  0 siblings, 0 replies; 3+ messages in thread
From: Liam Beguin @ 2019-08-03 21:23 UTC (permalink / raw)
  To: brian m. carlson, Liam Beguin, Git mailing list

Hi,

Sorry for sending this without checking the archives before...
I understand why this would not be such a good idea given the legal
meaning attached to it.
Thanks,

Liam

On Sat, Aug 3, 2019 at 5:12 PM brian m. carlson
<sandals@crustytoothpaste.net> wrote:
>
> On 2019-08-03 at 19:34:36, Liam Beguin wrote:
> > Add a configuration variable, based on format.signoff, to automatically
> > signoff commit messages.
> >
> > Signed-off-by: Liam Beguin <liambeguin@gmail.com>
>
> This has been proposed several times. It may be interesting to look
> through the history of the list and examine why it hasn't been accepted
> as a feature. A few attempts are chronicled here:
> https://public-inbox.org/git/?q=commit.signoff
>
> This is, however, achievable with a commit-msg hook or using "git
> interpret-trailers" if you are certain this is what you want to do.
> --
> brian m. carlson: Houston, Texas, US
> OpenPGP: https://keybase.io/bk2204

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-03 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-03 19:34 [PATCH 1/1] commit: add signoff config variable Liam Beguin
2019-08-03 21:11 ` brian m. carlson
2019-08-03 21:23   ` Liam Beguin

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git