mailing list mirror (one of many)
 help / Atom feed
From: Stefan Beller <>
To: Brandon Williams <>
Cc: "" <>, Jonathan Nieder <>
Subject: Re: [PATCH] submodule--helper: teach push-check to handle HEAD
Date: Fri, 23 Jun 2017 13:26:30 -0700
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Jun 23, 2017 at 1:04 PM, Brandon Williams <> wrote:
> In 06bf4ad1d (push: propagate remote and refspec with
> --recurse-submodules) push was taught how to propagate a refspec down to
> submodules when the '--recurse-submodules' flag is given.  The only refspecs
> that are allowed to be propagated are ones which name a ref which exists
> in both the superproject and the submodule, with the caveat that 'HEAD'
> was disallowed.
> This patch teaches push-check (the submodule helper which determines if
> a refspec can be propagated to a submodule) to permit propagating 'HEAD'
> if and only if the superproject and the submodule both have the same
> named branch checked out and the submodule is not in a detached head
> state.


We need this use case because Gerrit's documentation ingrains
this workflow in its users to use

    git push <remote> HEAD:refs/for/<target-branch>

And when both the submodule as well as the superproject
are still on a branch with the same name (and not detached) we'd
not be misunderstood by the user on the syntax.

More on the code later.

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 20:04 Brandon Williams
2017-06-23 20:26 ` Stefan Beller [this message]
2017-06-23 22:51 ` Junio C Hamano
2017-06-26 18:12   ` Brandon Williams
2017-07-20 17:40 ` [PATCH v2 1/1] " Brandon Williams

Reply instructions:

You may reply publically 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:

  List information:

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

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:
       or Tor2web:

AGPL code for this site: git clone public-inbox