From: Junio C Hamano <gitster@pobox.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
Martin Langhoff <martin.langhoff@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Publishing "filtered branch repositories" - workflow / recommendations?
Date: Wed, 11 Dec 2013 15:16:24 -0800 [thread overview]
Message-ID: <xmqqa9g7t1vb.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <52A8E124.4000002@web.de> (Jens Lehmann's message of "Wed, 11 Dec 2013 23:03:16 +0100")
Jens Lehmann <Jens.Lehmann@web.de> writes:
>> I think this is closely related to Martin's list of wishes we
>> earlier saw in the thread: remind the user to push necessary
>> submodule tip before the top-level commit that needs that commit in
>> the submodule is pushed out. Giving projects a way to implement
>> such a policy decision would be good, and having a default policy,
>> if we can find one that would be reasonable for any submodule users,
>> would be even better. Would adding a generic pre-push hook at the
>> top-level sufficient for that kind of thing, I have to wonder.
>
> That could call "git push --dry-run --recurse-submodules=check" to
> deny the push if the submodule commit isn't on a remote branch.
> that would only work for a single hardcoded remote, as the remote
> itself does not seem to be passed to the pre-push hook.
>
> So me thinks adding a configuration option for the --recurse-submodule
> option of push is the best way to achieve that. This could be set to
> "check" ...
Yes, that uses only a single hard-coded decision, and making the
branch name or remote name customizable is not enough, as you are
still hardcoding "if ... isn't on" part. It is not far-fetched to
imagine a project wants to add more restrictions to what commit in
the submodule history can be bound to a tree of a published commit
in the top-level project (e.g. "must be a tagged release point",
"must be older at least by more than two weeks", "must be signed by
one of these developers' keys", etc.).
So I am not yet convinced that a simple "option" that supplies a few
parameters to a single hard-coded policy is sufficient in the long
run.
next prev parent reply other threads:[~2013-12-11 23:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 23:01 Publishing "filtered branch repositories" - workflow / recommendations? Martin Langhoff
2013-12-05 18:43 ` Martin Langhoff
2013-12-05 19:18 ` Jens Lehmann
2013-12-05 19:27 ` Martin Langhoff
2013-12-05 19:54 ` Jens Lehmann
2013-12-05 22:06 ` Martin Langhoff
2013-12-06 8:48 ` Jens Lehmann
2013-12-06 19:40 ` Martin Langhoff
2013-12-09 22:59 ` Heiko Voigt
2013-12-09 23:56 ` Junio C Hamano
2013-12-11 22:03 ` Jens Lehmann
2013-12-11 23:16 ` Junio C Hamano [this message]
2013-12-12 13:39 ` Heiko Voigt
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=xmqqa9g7t1vb.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=martin.langhoff@gmail.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).