{"thread":{"id":"16872","subject":"[PATCH] Add a commit.signoff configuration variable to always use --signoff.","startedAt":"2008-12-26T12:56:59Z","lastAt":"2009-01-02T12:46:50Z","messageCount":19,"participants":["Adeodato Simó","Nanako Shiraishi","Junio C Hamano","Thomas Rast","Jan Krüger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98728","messageId":"1230296219-16408-1-git-send-email-dato@net.com.org.es","threadId":"16872","inReplyTo":null,"subject":"[PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-26T12:56:59Z","receivedAt":"2008-12-26T12:56:59Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"Signed-off-by: Adeodato Simó <dato@net.com.org.es>\n---\nI wrote:\n> Has there even been talk of a commit.signoff configuration variable\n> to always add a S-o-b line? This could allow to enable it on a\n> per-project basis, which would be cool.\n\nWell, it seemed easy enough to do, so I went ahead. Comments would be\nwelcome.\n\n Documentation/config.txt     |    6 ++++++\n Documentation/git-commit.txt |    3 ++-\n builtin-commit.c             |    5 +++++\n 3 files changed, 13 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 52786c7..6d195a3 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -591,6 +591,12 @@ color.ui::\n commit.template::\n \tSpecify a file to use as the template for new commit messages.\n \n+commit.signoff::\n+\tIf set, 'git-commit' will always add a Signed-off-by line. If\n+\tyou don't want it always active, you can still set it in the\n+\trepository specific configuration file for projects that require\n+\ta Signed-off-by line for all commits.\n+\n diff.autorefreshindex::\n \tWhen using 'git-diff' to compare with work tree\n \tfiles, do not consider stat-only change as changed.\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex b5d81be..abab839 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -96,7 +96,8 @@ OPTIONS\n -s::\n --signoff::\n \tAdd Signed-off-by line by the committer at the end of the commit\n-\tlog message.\n+\tlog message. This overrides the `commit.signoff` configuration\n+\tvariable.\n \n -n::\n --no-verify::\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex e88b78f..fc09539 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -929,6 +929,11 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \tif (!strcmp(k, \"commit.template\"))\n \t\treturn git_config_string(&template_file, k, v);\n \n+\tif (!strcmp(k, \"commit.signoff\")) {\n+\t\tsignoff = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n+\n \treturn git_status_config(k, v, cb);\n }\n \n-- \n1.6.1.307.g07803\n"},{"id":"98744","messageId":"20081227070228.6117@nanako3.lavabit.com","threadId":"16872","inReplyTo":"1230296219-16408-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2008-12-26T22:02:28Z","receivedAt":"2008-12-26T22:02:28Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Adeodato Simó <dato@net.com.org.es>:\n\n> I wrote:\n>> Has there even been talk of a commit.signoff configuration variable\n>> to always add a S-o-b line? This could allow to enable it on a\n>> per-project basis, which would be cool.\n\nThere was a discussion in \"http://thread.gmane.org/gmane.comp.version-control.git/32503/focus=32522\" about automatically adding S-o-b line.\n\nEven though Junio said in his response \"it certainly is a possibility\", another solution that he referred to as \"cleaner and more useful\" in his message was made available in version 1.5.3 after this discussion.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"98746","messageId":"20081226221033.GA841@chistera.yi.org","threadId":"16872","inReplyTo":"20081227070228.6117@nanako3.lavabit.com","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-26T22:10:33Z","receivedAt":"2008-12-26T22:10:33Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Nanako Shiraishi [Sat, 27 Dec 2008 07:02:28 +0900]:\n\n> There was a discussion in\n> \"http://thread.gmane.org/gmane.comp.version-control.git/32503/focus=32522\"\n> about automatically adding S-o-b line.\n\nAh, thanks for the pointer.\n\n> Even though Junio said in his response \"it certainly is a\n> possibility\", another solution that he referred to as \"cleaner and\n> more useful\" in his message was made available in version 1.5.3 after\n> this discussion.\n\nOh, a template file? I certainly hadn't thought of that, though I'd\nstill like to hear if my patch would be suitable for inclusion, because\nit's much more straightforward to use (and to discover).\n\nThanks,\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \n- I love you, Shirley, I'm not ashamed to say.\n- If you love me, then you'll want me to be happy. Even if I'm not with you.\n- I don't love you that much.\n                -- Denny Crane and Shirley Schmidt\n"},{"id":"98760","messageId":"7vabaijvxl.fsf@gitster.siamese.dyndns.org","threadId":"16872","inReplyTo":"20081226221033.GA841@chistera.yi.org","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-27T00:36:38Z","receivedAt":"2008-12-27T00:36:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adeodato Simó <dato@net.com.org.es> writes:\n\n> ... I'd\n> still like to hear if my patch would be suitable for inclusion, because\n> it's much more straightforward to use (and to discover).\n\nBut \"straightforward to discover\" is not an advantage in this case.\n\nAs long as it comes with documentation that clearly explains why this\nfeature should not be used blindly in order to avoid diluting the value of\nS-o-b, I think the feature itself is not a harmful thing to have.  Dscho's\nargument in the quoted thread that says it should be a conscious act to\nadd S-o-b (except for the part he misunderstands what S-o-b attests), is a\ngood one and still is valid.\n\nBy the way, please do not deflect away responses meant to you by using a\nMail-Followup-To header that points at the git mailing list.  It is rude.\n"},{"id":"98778","messageId":"20081227082620.GA5230@chistera.yi.org","threadId":"16872","inReplyTo":"7vabaijvxl.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T08:26:20Z","receivedAt":"2008-12-27T08:26:20Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Junio C Hamano [Fri, 26 Dec 2008 16:36:38 -0800]:\n\n> Adeodato Simó <dato@net.com.org.es> writes:\n\n> > ... I'd\n> > still like to hear if my patch would be suitable for inclusion, because\n> > it's much more straightforward to use (and to discover).\n\n> But \"straightforward to discover\" is not an advantage in this case.\n\n> As long as it comes with documentation that clearly explains why this\n> feature should not be used blindly in order to avoid diluting the value of\n> S-o-b, I think the feature itself is not a harmful thing to have.  Dscho's\n> argument in the quoted thread that says it should be a conscious act to\n> add S-o-b (except for the part he misunderstands what S-o-b attests), is a\n> good one and still is valid.\n\nDoes this sound good? If so, I'll send an amended patch (or should I send an\nincremental/extra one instead?):\n\n+commit.signoff::\n+       If set, 'git-commit' will always add a Signed-off-by line.\n+       Please use this option with care: by enabling it, you're stating\n+       that all your commits will invariably meet the S-o-b\n+       requirements for any project you send patches to. It's probably\n+       best to only use it from your private repositories' .git/config\n+       file, and only for projects who require a S-o-b as proof of\n+       provenance of the patch, and not of its correctness or quality.\n\n> By the way, please do not deflect away responses meant to you by using a\n> Mail-Followup-To header that points at the git mailing list.  It is rude.\n\nI set a M-F-T header because I prefer not to be CC'ed. I have other\nmechanisms in place that prevent me from missing replies to my messages\n(based on In-Reply-To/References headers).\n\nNevertheless, if the list normally operates CC-based, I can see how pressing\nReply-to-all and not seing the original autor in the recipient list can be\noffputting, so I'll stop setting M-F-T in my messages to git@. (Hopefully\nstarting with this message already.)\n\nI didn't mean for it to be rude in any way.\n\nThanks,\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nA conference is a gathering of important people who singly can do nothing\nbut together can decide that nothing can be done.\n                -- Fred Allen\n"},{"id":"98779","messageId":"7v63l6f1mc.fsf@gitster.siamese.dyndns.org","threadId":"16872","inReplyTo":"20081227082620.GA5230@chistera.yi.org","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-27T08:44:59Z","receivedAt":"2008-12-27T08:44:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adeodato Simó <dato@net.com.org.es> writes:\n\n> Does this sound good? If so, I'll send an amended patch (or should I send an\n> incremental/extra one instead?):\n>\n> +commit.signoff::\n> +       If set, 'git-commit' will always add a Signed-off-by line.\n\nIt is not a big deal, but my first reaction to the above was \"S-o-b by\nwhom?  It misses details and does not say where to find them\".\n\nHow about \"if set, 'git commit' will behave as if '-s' option was given\",\nso that we can leave the details of whose S-o-b line to generate and such\nto the description of \"git commit -s\" manual page?\n\n> +       Please use this option with care: by enabling it, you're stating\n> +       that all your commits will invariably meet the S-o-b\n> +       requirements for any project you send patches to. It's probably\n> +       best to only use it from your private repositories' .git/config\n> +       file, and only for projects who require a S-o-b as proof of\n> +       provenance of the patch, and not of its correctness or quality.\n\nYeah, many projects do not even have S-o-b convention.\n\n>> By the way, please do not deflect away responses meant to you by using a\n>> Mail-Followup-To header that points at the git mailing list.  It is rude.\n>\n> I set a M-F-T header because I prefer not to be CC'ed. I have other\n> mechanisms in place that prevent me from missing replies to my messages\n> (based on In-Reply-To/References headers).\n>\n> Nevertheless, if the list normally operates CC-based, I can see how pressing\n> Reply-to-all and not seing the original autor in the recipient list can be\n> offputting, so I'll stop setting M-F-T in my messages to git@. (Hopefully\n> starting with this message already.)\n\nThanks.\n\nAnother problem that you seem to have missed about M-F-T is that while you\nsolicited responses from general public by CC'ing the list (which allowed\nme to respond to you), by forcing the response go only to the list, you\nexcluded people on the To: and Cc: list of your original message from my\nresponse.  You required them to be subscribed to the list, if they want to\nbe kept in the loop.\n"},{"id":"98781","messageId":"1230368596-6865-1-git-send-email-dato@net.com.org.es","threadId":"16872","inReplyTo":"7v63l6f1mc.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Add a commit.signoff configuration variable to always use --signoff","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T09:03:16Z","receivedAt":"2008-12-27T09:03:16Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"Signed-off-by: Adeodato Simó <dato@net.com.org.es>\n---\n\n* Junio C Hamano [Sat, 27 Dec 2008 00:44:59 -0800]:\n\n> > +commit.signoff::\n> > +       If set, 'git-commit' will always add a Signed-off-by line.\n\n> It is not a big deal, but my first reaction to the above was \"S-o-b by\n> whom?  It misses details and does not say where to find them\".\n\n> How about \"if set, 'git commit' will behave as if '-s' option was given\",\n> so that we can leave the details of whose S-o-b line to generate and such\n> to the description of \"git commit -s\" manual page?\n\nChanged.\n\n> > I'll send an amended patch (or should I send an incremental/extra\n> > one instead?)\n\nI didn't get an answer to this, so I'm sending an amended one, hoping\nthat's the correct thing to do in this land.\n\n> Another problem that you seem to have missed about M-F-T is that while you\n> solicited responses from general public by CC'ing the list (which allowed\n> me to respond to you), by forcing the response go only to the list, you\n> excluded people on the To: and Cc: list of your original message from my\n> response.  You required them to be subscribed to the list, if they want to\n> be kept in the loop.\n\nNo, not really, because Mutt will add to the M-F-T header all addresses\nthat appear on the To or Cc headers.\n\n Documentation/config.txt     |    9 +++++++++\n Documentation/git-commit.txt |    3 ++-\n builtin-commit.c             |    5 +++++\n 3 files changed, 16 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 52786c7..4d0a79b 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -591,6 +591,15 @@ color.ui::\n commit.template::\n \tSpecify a file to use as the template for new commit messages.\n \n+commit.signoff::\n+\tIf set, 'git commit' will behave as if '-s' option was given.\n+\tPlease use this option with care: by enabling it, you're stating\n+\tthat all your commits will invariably meet the S-o-b\n+\trequirements for any project you send patches to. It's probably\n+\tbest to only use it from your private repositories' .git/config\n+\tfile, and only for projects who require a S-o-b as proof of\n+\tprovenance of the patch, and not of its correctness or quality.\n+\n diff.autorefreshindex::\n \tWhen using 'git-diff' to compare with work tree\n \tfiles, do not consider stat-only change as changed.\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex b5d81be..abab839 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -96,7 +96,8 @@ OPTIONS\n -s::\n --signoff::\n \tAdd Signed-off-by line by the committer at the end of the commit\n-\tlog message.\n+\tlog message. This overrides the `commit.signoff` configuration\n+\tvariable.\n \n -n::\n --no-verify::\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex e88b78f..fc09539 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -929,6 +929,11 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \tif (!strcmp(k, \"commit.template\"))\n \t\treturn git_config_string(&template_file, k, v);\n \n+\tif (!strcmp(k, \"commit.signoff\")) {\n+\t\tsignoff = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n+\n \treturn git_status_config(k, v, cb);\n }\n \n-- \n1.6.1.307.g07803\n"},{"id":"98783","messageId":"200812271204.15268.trast@student.ethz.ch","threadId":"16872","inReplyTo":"1230368596-6865-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-12-27T11:04:11Z","receivedAt":"2008-12-27T11:04:11Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Adeodato Simó wrote:\n> +commit.signoff::\n> +\tIf set, 'git commit' will behave as if '-s' option was given.\n> +\tPlease use this option with care: by enabling it, you're stating\n> +\tthat all your commits will invariably meet the S-o-b\n> +\trequirements for any project you send patches to. It's probably\n> +\tbest to only use it from your private repositories' .git/config\n> +\tfile, and only for projects who require a S-o-b as proof of\n                           ^^^^^^^^^^^^\n\n\"projects which ...\" or \"projects that ...\".  \"Who\" can only stand for\npeople, not objects.\n\n> +\tprovenance of the patch, and not of its correctness or quality.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n\n\n\n\n\n"},{"id":"98784","messageId":"20081227110554.GA9314@chistera.yi.org","threadId":"16872","inReplyTo":"200812271204.15268.trast@student.ethz.ch","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T11:05:54Z","receivedAt":"2008-12-27T11:05:54Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Thomas Rast [Sat, 27 Dec 2008 12:04:11 +0100]:\n\n> Adeodato Simó wrote:\n> > +commit.signoff::\n> > +\tIf set, 'git commit' will behave as if '-s' option was given.\n> > +\tPlease use this option with care: by enabling it, you're stating\n> > +\tthat all your commits will invariably meet the S-o-b\n> > +\trequirements for any project you send patches to. It's probably\n> > +\tbest to only use it from your private repositories' .git/config\n> > +\tfile, and only for projects who require a S-o-b as proof of\n>                            ^^^^^^^^^^^^\n\n> \"projects which ...\" or \"projects that ...\".  \"Who\" can only stand for\n> people, not objects.\n\nGood catch, thank you. Hopefully Junio can amend.\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \n                                   Listening to: Miguel Bosé - Puede que\n"},{"id":"98787","messageId":"7v8wq1esvo.fsf@gitster.siamese.dyndns.org","threadId":"16872","inReplyTo":"1230368596-6865-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-27T11:53:47Z","receivedAt":"2008-12-27T11:53:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adeodato Simó <dato@net.com.org.es> writes:\n\n> +commit.signoff::\n> +\tIf set, 'git commit' will behave as if '-s' option was given.\n> +\tPlease use this option with care: by enabling it, you're stating\n> +\tthat all your commits will invariably meet the S-o-b\n> +\trequirements for any project you send patches to. It's probably\n\nThis is true only if you set it in your global configuration.  A more sane\nusage would be to have it per repository as you recommend in a later\nsentence, and \"for any project\" part is untrue when the reader does so.\n\n> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\n> index b5d81be..abab839 100644\n> --- a/Documentation/git-commit.txt\n> +++ b/Documentation/git-commit.txt\n> @@ -96,7 +96,8 @@ OPTIONS\n>  -s::\n>  --signoff::\n>  \tAdd Signed-off-by line by the committer at the end of the commit\n> -\tlog message.\n> +\tlog message. This overrides the `commit.signoff` configuration\n> +\tvariable.\n\nGood and careful thinking.  I like it.\n"},{"id":"98789","messageId":"20081227120128.GA11322@chistera.yi.org","threadId":"16872","inReplyTo":"7v8wq1esvo.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T12:01:28Z","receivedAt":"2008-12-27T12:01:28Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Junio C Hamano [Sat, 27 Dec 2008 03:53:47 -0800]:\n\n> Adeodato Simó <dato@net.com.org.es> writes:\n\n> > +commit.signoff::\n> > +\tIf set, 'git commit' will behave as if '-s' option was given.\n> > +\tPlease use this option with care: by enabling it, you're stating\n> > +\tthat all your commits will invariably meet the S-o-b\n> > +\trequirements for any project you send patches to. It's probably\n\n> This is true only if you set it in your global configuration.  A more sane\n> usage would be to have it per repository as you recommend in a later\n> sentence, and \"for any project\" part is untrue when the reader does so.\n\nHow about:\n\n  Please use this option with care: by enabling it globally, you'd be\n  stating...\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \n                              Listening to: Niza - Solsticio de invierno\n"},{"id":"98799","messageId":"20081227190819.7257932a@neuron","threadId":"16872","inReplyTo":"1230296219-16408-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2008-12-27T18:08:19Z","receivedAt":"2008-12-27T18:08:19Z","isPatch":true,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Hi,\n\nOn Fri, 26 Dec 2008 13:56:59 +0100\n\"Adeodato Simó\" <dato@net.com.org.es> wrote:\n\n> > Has there even been talk of a commit.signoff configuration variable\n> > to always add a S-o-b line? This could allow to enable it on a\n> > per-project basis, which would be cool.\n> \n> Well, it seemed easy enough to do, so I went ahead. Comments would be\n> welcome.\n\nI think it might be a good idea to allow overriding the config variable\nin the other direction, i.e. a --no-signoff option to commit. Otherwise,\nfor example, rebase would have no way of suppressing the S-o-b lines in\nrebased commits (and you might want to not automatically sign off\ncommits you rebase).\n\n-Jan\n"},{"id":"98802","messageId":"20081227184001.GA31893@chistera.yi.org","threadId":"16872","inReplyTo":"20081227190819.7257932a@neuron","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T18:40:01Z","receivedAt":"2008-12-27T18:40:01Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Jan Krüger [Sat, 27 Dec 2008 19:08:19 +0100]:\n\n> I think it might be a good idea to allow overriding the config variable\n> in the other direction, i.e. a --no-signoff option to commit. Otherwise,\n> for example, rebase would have no way of suppressing the S-o-b lines in\n> rebased commits (and you might want to not automatically sign off\n> commits you rebase).\n\nGood catch.\n\n--no-signoff exists already, so maybe git-rebase should just use it?\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nMan is certainly stark mad; he cannot make a flea, yet he makes gods by the\ndozens.\n                -- Michel de Montaigne\n"},{"id":"98803","messageId":"20081227201541.4a352129@neuron","threadId":"16872","inReplyTo":"20081227184001.GA31893@chistera.yi.org","subject":"Re: [PATCH] Add a commit.signoff configuration variable to always use --signoff.","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2008-12-27T19:15:41Z","receivedAt":"2008-12-27T19:15:41Z","isPatch":true,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Hi,\n\nOn Sat, 27 Dec 2008 19:40:01 +0100\n\"Adeodato Simó\" <dato@net.com.org.es> wrote:\n\n> > I think it might be a good idea to allow overriding the config\n> > variable in the other direction, i.e. a --no-signoff option to\n> > commit. [...]\n> \n> Good catch.\n> \n> --no-signoff exists already, so maybe git-rebase should just use it?\n\nOh, yeah, I didn't notice the option mechanism worked this way and the\noptions got parsed after processing the config variables. I guess\nrebase and rebase--interactive should use it, then, and perhaps there\nare other commands that should that I just don't know about (a grep\nacross all commands implemented in shell script didn't find anything\nelse, though).\n\n-Jan\n"},{"id":"98884","messageId":"1230549405-10000-1-git-send-email-dato@net.com.org.es","threadId":"16872","inReplyTo":"20081227120128.GA11322@chistera.yi.org","subject":"[PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-29T11:16:45Z","receivedAt":"2008-12-29T11:16:45Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"The intent is that it only applies when the user runs `git commit`\nthemselves, hence a number of commands (rebase and revert/cherry-pick)\nhave started passing --no-signoff when invoking commit.\n\nSigned-off-by: Adeodato Simó <dato@net.com.org.es>\n---\n\nHello, I've worked a bit more on this patch, and I'd like to know if\nit's going in a good direction or not. Changes since v2:\n\n t/t7500-commit.sh        |   22 ++++++++++++++++++++++\n\n   * add tests to check that commit.signoff works correctly, and that \n     is overriden by --no-signoff\n\n git-rebase.sh            |    2 +-\n t/t3402-rebase-merge.sh  |    6 +++++-\n\n   * make git-rebase pass --no-signoff when invoking `git commit`, and\n     add a test for it\n   \n builtin-revert.c         |    2 ++\n\n   * make revert/cherry-pick pass --no-signoff unless -s was given by\n     the user (missing test)\n   \n Documentation/config.txt |    4 ++--\n\n   * improve config.txt wording as per <20081227120128.GA11322@chistera.yi.org>\n\n(I don't know if it's customary to send a diff from v2 to v3, if it is\nplease let me know.)\n\nThanks,\n\n Documentation/config.txt     |    9 +++++++++\n Documentation/git-commit.txt |    3 ++-\n builtin-commit.c             |    5 +++++\n builtin-revert.c             |    2 ++\n git-rebase.sh                |    2 +-\n t/t3402-rebase-merge.sh      |    6 +++++-\n t/t7500-commit.sh            |   22 ++++++++++++++++++++++\n 7 files changed, 46 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 52786c7..13f2200 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -591,6 +591,15 @@ color.ui::\n commit.template::\n \tSpecify a file to use as the template for new commit messages.\n \n+commit.signoff::\n+\tIf set, 'git commit' will behave as if '-s' option was given.\n+\tPlease use this option with care: by enabling it globally, you'd\n+\tbe stating that all your commits will invariably meet the S-o-b\n+\trequirements for any project you send patches to. It's probably\n+\tbest to only use it from your private repositories' .git/config\n+\tfile, and only for projects who require a S-o-b as proof of\n+\tprovenance of the patch, and not of its correctness or quality.\n+\n diff.autorefreshindex::\n \tWhen using 'git-diff' to compare with work tree\n \tfiles, do not consider stat-only change as changed.\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex b5d81be..abab839 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -96,7 +96,8 @@ OPTIONS\n -s::\n --signoff::\n \tAdd Signed-off-by line by the committer at the end of the commit\n-\tlog message.\n+\tlog message. This overrides the `commit.signoff` configuration\n+\tvariable.\n \n -n::\n --no-verify::\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex e88b78f..fc09539 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -929,6 +929,11 @@ static int git_commit_config(const char *k, const char *v, void *cb)\n \tif (!strcmp(k, \"commit.template\"))\n \t\treturn git_config_string(&template_file, k, v);\n \n+\tif (!strcmp(k, \"commit.signoff\")) {\n+\t\tsignoff = git_config_bool(k, v);\n+\t\treturn 0;\n+\t}\n+\n \treturn git_status_config(k, v, cb);\n }\n \ndiff --git a/builtin-revert.c b/builtin-revert.c\nindex d48313c..395c7a5 100644\n--- a/builtin-revert.c\n+++ b/builtin-revert.c\n@@ -429,6 +429,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)\n \t\targs[i++] = \"-n\";\n \t\tif (signoff)\n \t\t\targs[i++] = \"-s\";\n+\t\telse\n+\t\t\targs[i++] = \"--no-signoff\";\n \t\tif (!edit) {\n \t\t\targs[i++] = \"-F\";\n \t\t\targs[i++] = defmsg;\ndiff --git a/git-rebase.sh b/git-rebase.sh\nindex ebd4df3..bf520d0 100755\n--- a/git-rebase.sh\n+++ b/git-rebase.sh\n@@ -63,7 +63,7 @@ continue_merge () {\n \tcmt=`cat \"$dotest/current\"`\n \tif ! git diff-index --quiet --ignore-submodules HEAD --\n \tthen\n-\t\tif ! git commit --no-verify -C \"$cmt\"\n+\t\tif ! git commit --no-verify --no-signoff -C \"$cmt\"\n \t\tthen\n \t\t\techo \"Commit failed, please do not call \\\"git commit\\\"\"\n \t\t\techo \"directly, but instead do one of the following: \"\ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 7b7d072..bd2d08c 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -41,7 +41,8 @@ test_expect_success setup '\n \tgit branch test-rebase side &&\n \tgit branch test-rebase-pick side &&\n \tgit branch test-reference-pick side &&\n-\tgit checkout -b test-merge side\n+\tgit checkout -b test-merge side &&\n+\tgit config commit.signoff true\n '\n \n test_expect_success 'reference merge' '\n@@ -54,6 +55,9 @@ test_expect_success rebase '\n \tGIT_TRACE=1 git rebase --merge master\n '\n \n+test_expect_success 'rebase uses --no-signoff' '\n+\t!(git log | grep -q Signed-off-by)'\n+\n test_expect_success 'test-rebase@{1} is pre rebase' '\n \ttest $PRE_REBASE = $(git rev-parse test-rebase@{1})\n '\ndiff --git a/t/t7500-commit.sh b/t/t7500-commit.sh\nindex 6e18a96..c7deb3e 100755\n--- a/t/t7500-commit.sh\n+++ b/t/t7500-commit.sh\n@@ -147,6 +147,10 @@ zort\n Signed-off-by: C O Mitter <committer@example.com>\n EOF\n \n+cat > expect_no_signoff << EOF\n+zort\n+EOF\n+\n test_expect_success '--signoff' '\n \techo \"yet another content *narf*\" >> foo &&\n \techo \"zort\" | (\n@@ -157,6 +161,24 @@ test_expect_success '--signoff' '\n \ttest_cmp expect output\n '\n \n+test_expect_success 'commit.signoff' '\n+\techo \"and more content\" >> foo &&\n+\tgit config commit.signoff true &&\n+\techo \"zort\" | git commit -F - foo &&\n+\tgit config --unset commit.signoff &&\n+\tgit cat-file commit HEAD | sed \"1,/^$/d\" > output &&\n+\ttest_cmp expect output\n+'\n+\n+test_expect_success '--no-signoff trumps commit.signoff' '\n+\techo \"and even more\" >> foo &&\n+\tgit config commit.signoff true &&\n+\techo \"zort\" | git commit --no-signoff -F - foo &&\n+\tgit config --unset commit.signoff &&\n+\tgit cat-file commit HEAD | sed \"1,/^$/d\" > output &&\n+\ttest_cmp expect_no_signoff output\n+'\n+\n test_expect_success 'commit message from file (1)' '\n \tmkdir subdir &&\n \techo \"Log in top directory\" >log &&\n-- \n1.6.1.307.g07803\n"},{"id":"98885","messageId":"20081229111801.GA10247@chistera.yi.org","threadId":"16872","inReplyTo":"1230549405-10000-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-29T11:18:01Z","receivedAt":"2008-12-29T11:18:01Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":">  Changes since v2:\n\n(Updating git-rebase--interactive.sh is still missing, I know.)\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nHe who has not a good memory should never take upon himself the trade of lying.\n                -- Michel de Montaigne\n"},{"id":"98994","messageId":"7v4p0l1ik2.fsf@gitster.siamese.dyndns.org","threadId":"16872","inReplyTo":"1230549405-10000-1-git-send-email-dato@net.com.org.es","subject":"Re: [PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-30T21:04:13Z","receivedAt":"2008-12-30T21:04:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Adeodato Simó <dato@net.com.org.es> writes:\n\n> diff --git a/builtin-revert.c b/builtin-revert.c\n> index d48313c..395c7a5 100644\n> --- a/builtin-revert.c\n> +++ b/builtin-revert.c\n> @@ -429,6 +429,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)\n>  \t\targs[i++] = \"-n\";\n>  \t\tif (signoff)\n>  \t\t\targs[i++] = \"-s\";\n> +\t\telse\n> +\t\t\targs[i++] = \"--no-signoff\";\n>  \t\tif (!edit) {\n>  \t\t\targs[i++] = \"-F\";\n>  \t\t\targs[i++] = defmsg;\n\nIntroduction of --no-commit to \"git commit\" is absolutely necessary for\ninteractive users if we were to introduce commit.signoff, but I am not\nsure about this change and similar ones given to the other Porcelain\ncommands that use \"git commit\".  They actually started making me think\nthat commmit.signoff might be more trouble than it is worth.\n\nIt is plausible that your workflow is to have others push to your 'mob'\nbranch and integrating good bits from there by cherry-picking, sort of\nlike using the 'mob' branch as if they are e-mailed patches.  In such a\nsetup, if you are so forgetful to type \"-s\" for your commit that you would\nwant commit.signoff configuration, you would likely to be equally\nforgetful to type \"-s\" for your cherry-pick, and would want to have some\nconfiguration affect how this part of the code works.\n\nI however moderately doubt if the complexity and flexibility of having\nrebase.signoff, revert.signoff, and cherry-pick.signoff as independent\noptions is worth it.  I am inclined to think that is too many knobs to\ntweak, and it is far simpler to understand and easier to explain if the\nsingle configuration, commit.signoff, applied to every Porcelain that\ncreates commits.\n\nIf we were to go that route, instead of passing --no-signoff when they\ninvoke \"git commit\", these commands need to take their own --no-signoff\noption instead, and when neither --signoff nor --no-signoff is given, they\njust should just invoke \"git commit\" and let it use the config (if set).\n"},{"id":"99122","messageId":"20090101221817.GA29267@chistera.yi.org","threadId":"16872","inReplyTo":"7v4p0l1ik2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-01T22:18:17Z","receivedAt":"2009-01-01T22:18:17Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Junio C Hamano [Tue, 30 Dec 2008 13:04:13 -0800]:\n\n> They actually started making me think\n> that commmit.signoff might be more trouble than it is worth.\n\nI am beginning to think the same myself, and I'm okay with letting go.\nIf somebody has a sensible plan, I can invest some time on implementing\nit, but I'll reckon it all tastes too messy at the moment.\n\nThanks for your time.\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \n                                     Listening to: Vanessa-Mae - Leyenda\n"},{"id":"99163","messageId":"20090102124650.GA2395@chistera.yi.org","threadId":"16872","inReplyTo":"20090101221817.GA29267@chistera.yi.org","subject":"Re: [PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2009-01-02T12:46:50Z","receivedAt":"2009-01-02T12:46:50Z","isPatch":true,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"* Adeodato Simó [Thu, 01 Jan 2009 23:18:17 +0100]:\n\n> * Junio C Hamano [Tue, 30 Dec 2008 13:04:13 -0800]:\n\n> > They actually started making me think\n> > that commmit.signoff might be more trouble than it is worth.\n\n> I am beginning to think the same myself, and I'm okay with letting go.\n> If somebody has a sensible plan, I can invest some time on implementing\n> it, but I'll reckon it all tastes too messy at the moment.\n\n> Thanks for your time.\n\nOh, I see you merged the last version into pu. I don't know if that\nmeans it'd be bad for me to abandon now, but as said, if somebody helps\nme figure out things, I'm open to continue working on it.\n\nI just don't want to be pushing for inclusion of something of\nsub-standard (UI) quality.\n\nCheers,\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \nWill you just stand still?\n                -- Luke Danes\n"}]}