All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Stefan Beller <sbeller@google.com>
Cc: Dennis Kaarsemaker <dennis@kaarsemaker.net>,
	git@vger.kernel.org, dwwang@google.com
Subject: Re: [RFC PATCHv1 0/4] Push options in C Git
Date: Fri, 1 Jul 2016 03:09:03 -0400	[thread overview]
Message-ID: <20160701070902.GF5358@sigill.intra.peff.net> (raw)
In-Reply-To: <20160630005951.7408-1-sbeller@google.com>

On Wed, Jun 29, 2016 at 05:59:47PM -0700, Stefan Beller wrote:

> Allow a user to pass information along a push to the pre/post-receive hook
> on the remote.

Seems like a reasonable thing to want, and related to:

  http://thread.gmane.org/gmane.comp.version-control.git/285124

which was specifically interested in making "--quiet" and "--force"
available, but stopped short of arbitrary data. (It looks like that
topic got overlooked, and Dennis never prodded again).

> When using a remote that is more than just a plain Git host (e.g. Gerrit,
> Git{hub/lab}, etc) this may become more obvious: The (server backend specific)
> push options can instruct the server to:
> * open a pull request

I know this is just a "for example", but I don't know if we would ever
support opening a pull request directly via push, if only because a good
pull request has actual parameters that the user needs to fill out (like
the cover letter message).

So you'd probably want some client tool to help the user figure out what
to put in the PR, and of course that already exists, because GitHub has
an HTTP API that it can talk to. Shoe-horning it into Git doesn't buy
much.

I'm not sure if your other examples would be better served by just using
an HTTP API or not. I think Gerrit is funny in this regard because it
eschews branches entirely. E.g., in a GitHub PR, you push to branch
"foo", and then you open a PR using "foo" as the source. But with
Gerrit, you push to the magic refs/for/master, and you have no real way
to cross-reference that submission later.

Whereas in Dennis's patches, it was about specific information directly
related to the act of pushing.

> * When pushing to Gerrit you can already attach some of this information by
>   adding a '%' followed by the parameter to the ref, i.e. when interacting with
>   Gerrit it is possible to do things like[1]:
>     
>     git push origin HEAD:refs/for/master%draft%topic=example%cc=jon.doe@example.org
>   
>   This is not appealing to our users as it looks like hacks upon hacks to make
>   it work. It would read better if it was spelled as:

Heh. It _is_ hacks upon hacks, isn't it? ;)

-Peff

  parent reply	other threads:[~2016-07-01  7:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  0:59 [RFC PATCHv1 0/4] Push options in C Git Stefan Beller
2016-06-30  0:59 ` [PATCH 1/4] push options: {pre,post}-receive hook learns about push options Stefan Beller
2016-07-01  7:14   ` Jeff King
2016-07-01 17:20     ` Stefan Beller
2016-07-01 17:59       ` Jeff King
2016-07-01 18:03         ` Junio C Hamano
2016-07-01 18:11           ` Jeff King
2016-07-01 19:25             ` Junio C Hamano
2016-07-01 19:31               ` Stefan Beller
2016-07-01 19:39               ` Jeff King
2016-07-01 19:50                 ` Stefan Beller
2016-07-01 18:40         ` Stefan Beller
2016-06-30  0:59 ` [PATCH 2/4] receive-pack: implement advertising and receiving " Stefan Beller
2016-07-01 17:11   ` Junio C Hamano
2016-07-01 17:24     ` Stefan Beller
2016-06-30  0:59 ` [PATCH 3/4] push: accept " Stefan Beller
2016-06-30  0:59 ` [PATCH 4/4] add a test for " Stefan Beller
2016-07-01  7:09 ` Jeff King [this message]
2016-07-01 17:07   ` [RFC PATCHv1 0/4] Push options in C Git Stefan Beller
2016-07-01 17:55     ` Jeff King
2016-07-01 18:25       ` Stefan Beller
2016-07-01 20:01         ` Jeff King

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=20160701070902.GF5358@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=dennis@kaarsemaker.net \
    --cc=dwwang@google.com \
    --cc=git@vger.kernel.org \
    --cc=sbeller@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.