git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Nico Williams <nico@cryptonector.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	git discussion list <git@vger.kernel.org>,
	Ronnie Sahlberg <sahlberg@google.com>
Subject: Re: Use case (was Re: Should branches be objects?)
Date: Tue, 24 Jun 2014 07:09:32 -0400	[thread overview]
Message-ID: <20140624110932.GI14887@thunk.org> (raw)
In-Reply-To: <CAK3OfOgskVKs=eUT+EM+GZOjh0p6gxKeDWH-iTt29P1i1d1iZA@mail.gmail.com>

On Mon, Jun 23, 2014 at 10:20:14PM -0500, Nico Williams wrote:
> 
> Now, suppose that branches were objects.  Then at push time one might
> push with a message about the set of commits being pushed, and this
> message (and time of push, and pusher ID) would get recorded in the
> branch object.  At fetch time the branch objects's histories would be
> pulled (but usually never pushed), and would be available for browsing
> with git log at remotes/<remote>/<branch>.  Each commit of the branch
> object (as it were) would record each logical set of commits.

This seems pretty close to what we have with signed tags.  When I send
a pull request to Linus, I create a signed tag which createscontains a
message about a set of commits, and this message is automatically
included in the pull request message generated with "git
request-pull", and when Linus merges my pull request, the
cryptographically signed tag, along with the message, date of the
signature, etc., is preserved for all posterity.

> Problem: if pushing via an intermediary the push metadat would get
> lost.  This would argue for either a stronger still notion of related
> commits, or none stronger than what exists now (because ETOOMUCH).
> But this branch object concept could also be just right: if pushing
> through a an intermediary (what at Sun was called a project gate) then
> it becomes that intermedirary's (gatekeeper's) job to squash, rebase,
> regroup, edit, drop, reword, ... commits.

With signed tags, the metadata is preserved even when the set of
commits is sent via an intermediary.

It seems the major difference is that it's a pull model, where some
projects seem much happier with a push model.  But that sounds like
what is needed is that someone replaces Linus Torvalds with a shell
script --- namely, an e-mail bot that receives pull requests, checks
the signed tag against an access control list, and if it is an
authorized committer, accepts the pull request automatically (or
rejects it if there are merge conflicts).

Not that I am suggesting for even a second that Linus could be fully
replaced by a shell script.  For example, he handles trivial merge
conflicts, and more importantly, applies a "oh my G*d you must be
kidding" taste filter on incoming pull requests, which I think would
be hard to automate.  Then again, neural networks have automatically
evolved to recognize cat videos, so we can't rule it out in the
future.  :-)

Cheers,

							- Ted

  parent reply	other threads:[~2014-06-24 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  3:20 Use case (was Re: Should branches be objects?) Nico Williams
2014-06-24 11:01 ` John Keeping
2014-06-24 11:09 ` Theodore Ts'o [this message]
2014-06-25  5:29   ` Nico Williams
2014-06-25 17:42     ` Junio C Hamano
2014-06-25 22:44       ` Theodore Ts'o

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=20140624110932.GI14887@thunk.org \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=nico@cryptonector.com \
    --cc=sahlberg@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.
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).