git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Marius Raht <mariusraht@gmail.com>, git@vger.kernel.org
Subject: Re: Feature Request: Check if commit is existent via http-protocol
Date: Thu, 14 Nov 2019 01:41:37 -0500	[thread overview]
Message-ID: <20191114064137.GF10643@sigill.intra.peff.net> (raw)
In-Reply-To: <20191114025244.GC9216@camp.crustytoothpaste.net>

On Thu, Nov 14, 2019 at 02:52:44AM +0000, brian m. carlson wrote:

> Git supports a massive number of ways to query data, and there's just no
> way to efficiently and securely support all of those methods natively
> over an API.  In fact, some operations Git can perform are potentially
> expensive, and exposing an API to perform those is a security problem
> (due to DoS attacks).
> 
> Some of that functionality is available in various Git hosting solutions
> through their own APIs, but as far as I'm aware, there aren't any which
> perform this operation (which is essentially "git merge-base
> --is-ancestor").  If you want this functionality in a particular
> platform, I'd encourage you to reach out to the provider of that
> platform to ask them if they'd implement it.  However, I don't think
> we're likely to implement it in Git's HTTP protocol.
> 
> Other contributors are welcome to chime in if anything I said seems
> incorrect or off base.

I think that's all accurate.

There's nothing to say we _couldn't_ provide a richer set of commands
via Git's protocol. There are already uncommon ones like upload-archive.
And people have talked about being able to offload git-grep requests to
a server.

But it really opens a can of worms in terms of which operations to
support, how to handle load, etc. The strategy so far for Git itself has
been to keep servers relatively dumb, and clients interested in doing
queries should clone and then do what they want locally. That's not the
most efficient thing for clients that want to do one-off queries, but it
keeps the boundaries clean. Even if we did implement more server-side
operations, they'd almost certainly be disabled by default.

-Peff

  reply	other threads:[~2019-11-14  6:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 13:14 Feature Request: Check if commit is existent via http-protocol Marius Raht
2019-11-14  2:52 ` brian m. carlson
2019-11-14  6:41   ` Jeff King [this message]
2019-11-14 20:05 ` Jonathan 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

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

  git send-email \
    --in-reply-to=20191114064137.GF10643@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mariusraht@gmail.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).