git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] rebase: add --verify-signatures
Date: Wed, 16 Dec 2015 14:39:15 +0100	[thread overview]
Message-ID: <20151216133915.GA3586@blarch> (raw)
In-Reply-To: <xmqqy4d2gjw6.fsf@gitster.mtv.corp.google.com>

On Thu, Dec 10, 2015 at 11:53:45AM -0800, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Alexander 'z33ky' Hirsch <1zeeky@gmail.com> writes:
> >
> >> +	if test -n "$rebase_root"
> >> +	then
> >> +		foreign_revisions="$orig_head..$onto"
> >> +	else
> >> +		foreign_revisions="$orig_head..${restrict_revision-$upstream}"
> >> +	fi
> >> +
> >> +	for cmt in $(git rev-list --reverse "$foreign_revisions")
> >> +	do
> >> +		if ! git log -1 --pretty=format:'%G?%n%GS' "$cmt" |
> >
> > I do not think this matches what the corresponding option in "git
> > merge" does, where the only tips of the histories being merged are
> > checked.

Oh, indeed. I saw the loop in merge.c and by brain went there without
any further thought. This would be easy to fix though.

> Having said that, I somehow doubt that verify-signatures is a
> feature that is desirable in a workflow around "pull --rebase" in
> the larger picture.  If you step back a bit, in a "merge" based
> workflow, you are the keeper of the sanity, cleanliness, and all the
> good things in the authoritative history when doing a "git pull".
> That is why you would want to validate what gets merged from another
> place and in that context having --verify-signatures may make sense
> (and it might even make more sense if the code did so for all new
> commits, not just the tip, but that is a separate topic).  If the
> validation fails, you would tell the owner of that side branch you
> just attempted to pull from to get her act together before asking to
> be pulled again.  There is a clear path to make further progress
> after the validation fails.
> 
> In a workflow that is built around "pull --rebase", you are _given_
> the authoritative history with all the good things from another
> place and then you rebuild your own work on top of it.  The sanity
> and cleanliness of what you built on top is given, and rejecting it
> at that point would not help you make further progress in any way,
> as that is a published history that is shared and more authoritative
> than what you have.

Well, the rejection would not refer to the work you put on top, but to
the commits you want to base your work on.
If validation fails, then an empty commit that is signed can be
committed on top of the previously unsigned branch if commit rewriting
is not allowed.

> Hence, while I 100% agree with Brian's "it is not there because
> nobody bothered to add the corresponding option on the rebase side",
> I do not necessarily think "nobody bothered" is the same as "they
> were too lazy"--perhaps some people thought about doing it, and then
> decided not to, because the option made no sense when they stepped
> back to look at the larger picture.

That's why I was asking in my first mail if such an addition would make
sense. I don't really have an agenda or a pressing need for this
feature, I just noticed that a `git pull --rebase --verify-signatures`
did not complain when it looked like it ought to.
If this patch gets rejected then I will propose one which makes git-pull
warn, or even error, when both --rebase and --verify-signatures is
passed.

Regards,
Alexander Hirsch

  reply	other threads:[~2015-12-16 12:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 13:03 [PATCH] rebase: add --verify-signatures Alexander 'z33ky' Hirsch
2015-12-10 19:11 ` Junio C Hamano
2015-12-10 19:53   ` Junio C Hamano
2015-12-16 13:39     ` Alexander 'z33ky' Hirsch [this message]
2015-12-16 18:12       ` Junio C Hamano
2015-12-17  1:04         ` Alexander 'z33ky' Hirsch
2015-12-17 18:22           ` Junio C Hamano
     [not found]             ` <20151221140414.GA3422@netblarch.tu-darmstadt.de>
     [not found]               ` <xmqqvb7re55d.fsf@gitster.mtv.corp.google.com>
2015-12-22 23:12                 ` Alexander 'z33ky' Hirsch

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=20151216133915.GA3586@blarch \
    --to=1zeeky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /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.
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 NNTP newsgroup(s).