public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Alexander 'z33ky' Hirsch <1zeeky@gmail•com>
Cc: git@vger•kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste•net>,
	Stefan Beller <sbeller@google•com>
Subject: Re: [PATCH] pull: warn on --verify-signatures with --rebase
Date: Wed, 18 May 2016 09:04:24 -0700	[thread overview]
Message-ID: <xmqq37pftks7.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160518101827.GA14475@netblarch> (Alexander Hirsch's message of "Wed, 18 May 2016 12:18:27 +0200")

Alexander 'z33ky' Hirsch <1zeeky@gmail•com> writes:

> Previously git-pull silently ignored the --verify-signatures option for
> --rebase.

Missing pieces information that would have made the patch more
complete are answers to these questions:

 - Is that a bad thing?  Why?

 - Assuming it is a bad thing, what is the solution this patch
   presents us?  Teach rebase about the option?  Error out the
   request?  What is the reason why "warn" was chosen as the best
   way forward?

>  builtin/pull.c  |  2 ++
>  t/t5520-pull.sh | 16 ++++++++++++++++
>  2 files changed, 18 insertions(+)
>
> diff --git a/builtin/pull.c b/builtin/pull.c
> index 1d7333c..0eafae7 100644
> --- a/builtin/pull.c
> +++ b/builtin/pull.c
> @@ -815,6 +815,8 @@ static int run_rebase(const unsigned char *curr_head,
>  		argv_array_push(&args, "--no-autostash");
>  	else if (opt_autostash == 1)
>  		argv_array_push(&args, "--autostash");
> +	if (opt_verify_signatures && strcmp(opt_verify_signatures, "--verify-signatures") == 0)

The logic looks OK.  I would have written that long line as two
lines, e.g.

	if (opt_verify_signatures &&
            !strcmp(opt_verify_signatures, "--verify-signatures")

though.

> +		warning(_("git-rebase does not support --verify-signatures"));

Is this a good warning message?

As a casual reader, my reaction to this warning would be "Does not
support?  Then what did it do instead?  Did it refuse to integrate
my changes on top of what happened on the remote?"

Something like

    warning(_("ignored --verify-signatures as it is meaningless in rebase"));

may convey what is going on better, in that it makes it clear that
we are not failing "rebase" and instead we are ignoring "verify".

It is way too long for the final version, though.  A more concise
way to say the same thing needs to be found.

Thanks.

  reply	other threads:[~2016-05-18 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 10:18 [PATCH] pull: warn on --verify-signatures with --rebase Alexander 'z33ky' Hirsch
2016-05-18 16:04 ` Junio C Hamano [this message]
2016-05-19 10:02   ` Alexander 'z33ky' Hirsch
2016-05-19 15:46     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=xmqq37pftks7.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=1zeeky@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=sbeller@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox