{"thread":{"id":"51582","subject":"[PATCH 1/1] commit: add signoff config variable","startedAt":"2019-08-03T19:35:05Z","lastAt":"2019-08-03T21:23:21Z","messageCount":3,"participants":["Liam Beguin","brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"379884","messageId":"20190803193436.13158-1-liambeguin@gmail.com","threadId":"51582","inReplyTo":null,"subject":"[PATCH 1/1] commit: add signoff config variable","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2019-08-03T19:34:36Z","receivedAt":"2019-08-03T19:35:05Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Add a configuration variable, based on format.signoff, to automatically\nsignoff commit messages.\n\nSigned-off-by: Liam Beguin <liambeguin@gmail.com>\n---\n Documentation/config/commit.txt | 7 +++++++\n builtin/commit.c                | 4 ++++\n 2 files changed, 11 insertions(+)\n\ndiff --git a/Documentation/config/commit.txt b/Documentation/config/commit.txt\nindex 2c95573930be..62aaacb0dc74 100644\n--- a/Documentation/config/commit.txt\n+++ b/Documentation/config/commit.txt\n@@ -27,3 +27,10 @@ commit.template::\n commit.verbose::\n \tA boolean or int to specify the level of verbose with `git commit`.\n \tSee linkgit:git-commit[1].\n+\n+commit.signOff::\n+\tA boolean value which lets you enable the `-s/--signoff` option of\n+\t`git commit` by default. *Note:* Adding the Signed-off-by: line to a\n+\tpatch should be a conscious act and means that you certify you have\n+\tthe rights to submit this work under the same open source license.\n+\tPlease see the 'SubmittingPatches' document for further discussion.\ndiff --git a/builtin/commit.c b/builtin/commit.c\nindex ae7aaf6dc683..36d70396ace7 100644\n--- a/builtin/commit.c\n+++ b/builtin/commit.c\n@@ -1456,6 +1456,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \t\tconfig_commit_verbose = git_config_bool_or_int(k, v, &is_bool);\n \t\treturn 0;\n \t}\n+\tif (!strcmp(k, \"commit.signoff\")) {\n+\t\tsignoff = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n \n \tstatus = git_gpg_config(k, v, NULL);\n \tif (status)\n-- \n2.21.0.777.g83232e38648b\n\n"},{"id":"379889","messageId":"20190803211152.GA118825@genre.crustytoothpaste.net","threadId":"51582","inReplyTo":"20190803193436.13158-1-liambeguin@gmail.com","subject":"Re: [PATCH 1/1] commit: add signoff config variable","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-08-03T21:11:52Z","receivedAt":"2019-08-03T21:12:00Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2019-08-03 at 19:34:36, Liam Beguin wrote:\n> Add a configuration variable, based on format.signoff, to automatically\n> signoff commit messages.\n> \n> Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n\nThis has been proposed several times. It may be interesting to look\nthrough the history of the list and examine why it hasn't been accepted\nas a feature. A few attempts are chronicled here:\nhttps://public-inbox.org/git/?q=commit.signoff\n\nThis is, however, achievable with a commit-msg hook or using \"git\ninterpret-trailers\" if you are certain this is what you want to do.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"379890","messageId":"CAKm4OoWj6_D_aaq4mrAKHP3mieARjAAVmg2ea9axU2DE7My5VQ@mail.gmail.com","threadId":"51582","inReplyTo":"20190803211152.GA118825@genre.crustytoothpaste.net","subject":"Re: [PATCH 1/1] commit: add signoff config variable","fromName":"Liam Beguin","fromEmail":"liambeguin@gmail.com","sentAt":"2019-08-03T21:23:01Z","receivedAt":"2019-08-03T21:23:21Z","isPatch":true,"sender":{"key":"liambeguin@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3811160?v=4"},"body":"Hi,\n\nSorry for sending this without checking the archives before...\nI understand why this would not be such a good idea given the legal\nmeaning attached to it.\nThanks,\n\nLiam\n\nOn Sat, Aug 3, 2019 at 5:12 PM brian m. carlson\n<sandals@crustytoothpaste.net> wrote:\n>\n> On 2019-08-03 at 19:34:36, Liam Beguin wrote:\n> > Add a configuration variable, based on format.signoff, to automatically\n> > signoff commit messages.\n> >\n> > Signed-off-by: Liam Beguin <liambeguin@gmail.com>\n>\n> This has been proposed several times. It may be interesting to look\n> through the history of the list and examine why it hasn't been accepted\n> as a feature. A few attempts are chronicled here:\n> https://public-inbox.org/git/?q=commit.signoff\n>\n> This is, however, achievable with a commit-msg hook or using \"git\n> interpret-trailers\" if you are certain this is what you want to do.\n> --\n> brian m. carlson: Houston, Texas, US\n> OpenPGP: https://keybase.io/bk2204\n"}]}