git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] Add a commit.signoff configuration option to always use --signoff in commit

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 30, 2008, 21:04 UTC
Message-ID
<7v4p0l1ik2.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1230549405-10000-1-git-send-email-dato@net.com.org.es>
Adeodato Simó <dato@net.com.org.es> writes:
Show 13 quoted lines
> diff --git a/builtin-revert.c b/builtin-revert.c
> index d48313c..395c7a5 100644
> --- a/builtin-revert.c
> +++ b/builtin-revert.c
> @@ -429,6 +429,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>  		args[i++] = "-n";
>  		if (signoff)
>  			args[i++] = "-s";
> +		else
> +			args[i++] = "--no-signoff";
>  		if (!edit) {
>  			args[i++] = "-F";
>  			args[i++] = defmsg;

Introduction of --no-commit to "git commit" is absolutely necessary for interactive users if we were to introduce commit.signoff, but I am not sure about this change and similar ones given to the other Porcelain commands that use "git commit". They actually started making me think that commmit.signoff might be more trouble than it is worth.

It is plausible that your workflow is to have others push to your 'mob' branch and integrating good bits from there by cherry-picking, sort of like using the 'mob' branch as if they are e-mailed patches. In such a setup, if you are so forgetful to type "-s" for your commit that you would want commit.signoff configuration, you would likely to be equally forgetful to type "-s" for your cherry-pick, and would want to have some configuration affect how this part of the code works.

I however moderately doubt if the complexity and flexibility of having rebase.signoff, revert.signoff, and cherry-pick.signoff as independent options is worth it. I am inclined to think that is too many knobs to tweak, and it is far simpler to understand and easier to explain if the single configuration, commit.signoff, applied to every Porcelain that creates commits.

If we were to go that route, instead of passing --no-signoff when they invoke "git commit", these commands need to take their own --no-signoff option instead, and when neither --signoff nor --no-signoff is given, they just should just invoke "git commit" and let it use the config (if set).

Previous: Adeodato SimóNext: Adeodato Simó
Message 14 of 19 in “Add a commit.signoff configuration variable to always use --signoff.”
  1. Add a commit.signoff configuration variable to always use --signoff.Adeodato Simó, Dec 26, 2008
  2. Nanako ShiraishiDec 26, 2008
  3. Adeodato SimóDec 26, 2008
  4. Junio C HamanoDec 27, 2008
  5. Adeodato SimóDec 27, 2008
  6. Junio C HamanoDec 27, 2008
  7. Add a commit.signoff configuration variable to always use --signoffAdeodato Simó, Dec 27, 2008
  8. Thomas RastDec 27, 2008
  9. Adeodato SimóDec 27, 2008
  10. Junio C HamanoDec 27, 2008
  11. Adeodato SimóDec 27, 2008
  12. Add a commit.signoff configuration option to always use --signoff in commitAdeodato Simó, Dec 29, 2008
  13. Adeodato SimóDec 29, 2008
  14. Junio C HamanoDec 30, 2008
  15. Adeodato SimóJan 1, 2009
  16. Adeodato SimóJan 2, 2009
  17. Jan KrügerDec 27, 2008
  18. Adeodato SimóDec 27, 2008
  19. Jan KrügerDec 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.