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

Re: [PATCH v2 3/3] am: let --signoff override --no-signoff

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 7, 2015, 09:29 UTC
Message-ID
<16ad6c2da8f85b9f5fc26ee6ebad944b@www.dscho.org>
In-Reply-To
<1438697331-29948-4-git-send-email-pyokagan@gmail.com>
Hi Paul,
On 2015-08-04 16:08, Paul Tan wrote:
Show 27 quoted lines
> diff --git a/builtin/am.c b/builtin/am.c
> index 0961304..8c95aec 100644
> --- a/builtin/am.c
> +++ b/builtin/am.c
> @@ -2151,8 +2169,9 @@ int cmd_am(int argc, const char **argv, const
> [...]
> char *prefix)
>  		OPT_BOOL('3', "3way", &state.threeway,
>  			N_("allow fall back on 3way merging if needed")),
>  		OPT__QUIET(&state.quiet, N_("be quiet")),
> -		OPT_BOOL('s', "signoff", &state.signoff,
> -			N_("add a Signed-off-by line to the commit message")),
> +		OPT_SET_INT('s', "signoff", &state.signoff,
> +			N_("add a Signed-off-by line to the commit message"),
> +			SIGNOFF_EXPLICIT),
>  		OPT_BOOL('u', "utf8", &state.utf8,
>  			N_("recode into utf8 (default)")),
>  		OPT_SET_INT('k', "keep", &state.keep,
> @@ -2265,6 +2284,9 @@ int cmd_am(int argc, const char **argv, const
> char *prefix)
>  
>  		if (resume == RESUME_FALSE)
>  			resume = RESUME_APPLY;
> +
> +		if (state.signoff == SIGNOFF_EXPLICIT)
> +			am_append_signoff(&state);
>  	} else {
This is clever, but I suspect there is now a chance for a double-signoff if we passed `--signoff` to the initial `git am` call and it went through without having to resume.
Or am I missing something?

Ciao, Dscho

Previous: Paul TanNext: Paul Tan
Message 22 of 26 in “"git am" and then "git am -3" regression?”
  1. Junio C HamanoJul 24, 2015
  2. Jeff KingJul 24, 2015
  3. Paul TanJul 26, 2015
  4. Jeff KingJul 26, 2015
  5. Matthieu MoyJul 27, 2015
  6. Jeff KingJul 27, 2015
  7. Junio C HamanoJul 27, 2015
  8. am: let command-line options override saved optionsPaul Tan, Jul 28, 2015
  9. Junio C HamanoJul 28, 2015
  10. Junio C HamanoJul 28, 2015
  11. Paul TanJul 31, 2015
  12. Junio C HamanoJul 31, 2015
  13. Paul TanAug 1, 2015
  14. 0/3 am: let command-line options override saved optionsPaul Tan, Aug 4, 2015
  15. Junio C HamanoAug 4, 2015
  16. 0/3 am: let command-line options override saved optionsPaul Tan, Aug 4, 2015
  17. 1/3 test_terminal: redirect child process' stdin to a ptyPaul Tan, Aug 4, 2015
  18. Eric SunshineAug 6, 2015
  19. Paul TanAug 12, 2015
  20. 2/3 am: let command-line options override saved optionsPaul Tan, Aug 4, 2015
  21. 3/3 am: let --signoff override --no-signoffPaul Tan, Aug 4, 2015
  22. Johannes SchindelinAug 7, 2015
  23. Paul TanAug 12, 2015
  24. Paul TanAug 12, 2015
  25. Junio C HamanoAug 5, 2015
  26. Paul TanAug 5, 2015

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.