git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Paul Tan <pyokagan@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Stefan Beller <sbeller@google.com>,
	Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 3/3] am: let --signoff override --no-signoff
Date: Fri, 07 Aug 2015 11:29:13 +0200	[thread overview]
Message-ID: <16ad6c2da8f85b9f5fc26ee6ebad944b@www.dscho.org> (raw)
In-Reply-To: <1438697331-29948-4-git-send-email-pyokagan@gmail.com>

Hi Paul,

On 2015-08-04 16:08, Paul Tan wrote:

> 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

  reply	other threads:[~2015-08-07  9:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 17:48 "git am" and then "git am -3" regression? Junio C Hamano
2015-07-24 18:09 ` Jeff King
2015-07-26  5:03   ` Paul Tan
2015-07-26  5:21     ` Jeff King
2015-07-27  8:09       ` Matthieu Moy
2015-07-27  8:32         ` Jeff King
2015-07-27 14:21     ` Junio C Hamano
2015-07-28 16:43       ` [PATCH] am: let command-line options override saved options Paul Tan
2015-07-28 16:48         ` Junio C Hamano
2015-07-28 17:09         ` Junio C Hamano
2015-07-31 10:58           ` Paul Tan
2015-07-31 16:04             ` Junio C Hamano
2015-08-01  0:59               ` Paul Tan
2015-08-04 14:05         ` [PATCH v2 0/3] " Paul Tan
2015-08-04 21:12           ` Junio C Hamano
2015-08-04 14:08         ` Paul Tan
2015-08-04 14:08           ` [PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty Paul Tan
2015-08-06 22:15             ` Eric Sunshine
2015-08-12  4:16               ` Paul Tan
2015-08-04 14:08           ` [PATCH v2 2/3] am: let command-line options override saved options Paul Tan
2015-08-04 14:08           ` [PATCH v2 3/3] am: let --signoff override --no-signoff Paul Tan
2015-08-07  9:29             ` Johannes Schindelin [this message]
2015-08-12  3:06               ` Paul Tan
2015-08-12  3:07                 ` Paul Tan
2015-08-05 15:41           ` [PATCH v2 0/3] am: let command-line options override saved options Junio C Hamano
2015-08-05 17:51             ` Paul Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16ad6c2da8f85b9f5fc26ee6ebad944b@www.dscho.org \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=pyokagan@gmail.com \
    --cc=remi.lespinet@ensimag.grenoble-inp.fr \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).