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

Re: [PATCH] pull: warn on --verify-signatures with --rebase

From
Alexander 'z33ky' Hirsch <1zeeky@gmail.com>
Date
May 19, 2016, 10:02 UTC
Message-ID
<20160519100221.GB22257@netblarch>
In-Reply-To
<xmqq37pftks7.fsf@gitster.mtv.corp.google.com>
On Wed, May 18, 2016 at 09:04:24AM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> > 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?
> 

Is the warning a solution "for now" and might this become an error should a valid usecase not be found after a while?

Show 22 quoted lines
> >  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.
> 
I shall format it as per your suggestion in the next submission.
Show 8 quoted lines
> > +		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?"
> 
Indeed.
Show 10 quoted lines
> 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.
> 

Would "ignoring --verify-signatures for rebase" be sufficient? It does not describe why it is ignored though.

With Regards, Alexander Hirsch

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “pull: warn on --verify-signatures with --rebase”
  1. pull: warn on --verify-signatures with --rebaseAlexander 'z33ky' Hirsch, May 18, 2016
  2. Junio C HamanoMay 18, 2016
  3. Alexander 'z33ky' HirschMay 19, 2016
  4. Junio C HamanoMay 19, 2016

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.