From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: Dropping '+' from fetch = +refs/heads/*:refs/remotes/origin/*?
Date: Fri, 2 Sep 2011 12:25:24 -0400 [thread overview]
Message-ID: <20110902162524.GC19690@sigill.intra.peff.net> (raw)
In-Reply-To: <7v4o0uncq0.fsf@alter.siamese.dyndns.org>
On Fri, Sep 02, 2011 at 09:14:15AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > [1] My idea of "limited" would be an allow-known-good list of harmless
> > config keys which we would respect when they came from the remote, with
> > the option for the user to whitelist or blacklist more keys if they
> > wanted.
>
> It coincides with my idea too, but it might be a very limited set. For
> example, there may be a good "suggested by upstream" default for LHS of
> fetch refspecs (e.g. somebody may have 47 topics published but majority of
> people are expected to follow only his "master" branch), but it is up to
> the user of that suggestion what the RHS would be.
Yeah. That leads to synthesizing local keys based on what remote keys
say. Which is pretty straightforward if you are just fetching the
remote's config during clone, and then copying or creating local keys
based on that in your own .git/config (e.g., by creating full refspecs
with upstream's idea of the LHS, and our idea of the RHS).
But it becomes hard to keep your local config in sync with updates on
the remote end. When the remote now adds "next" to the list of
interesting branches, by what mechanism do you fix up your local config?
Certainly we wouldn't want to rewrite the local config without
consulting the user, because they may have reviewed or modified it since
it was created.
One possible solution is that the local config could dynamically depend
on the remote config. E.g., the fetch refspec has something like a
wildcard that matches only the branches that the remote provides to us
via some "interesting branches" config key. Then it's OK for git to
update the "interesting branches" key from the remote. Either the user
is OK with respecting that (because they have left the wildcard in
place), or not (because they have changed the refspec not to use that
wildcard).
I do worry that could quickly get complex, and people would start
wanting a Turing-complete config language. :)
-Peff
next prev parent reply other threads:[~2011-09-02 16:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 18:25 Dropping '+' from fetch = +refs/heads/*:refs/remotes/origin/*? Junio C Hamano
2011-09-01 18:39 ` Junio C Hamano
2011-09-01 19:14 ` Shawn Pearce
2011-09-01 19:20 ` Michael J Gruber
2011-09-01 19:35 ` Matthieu Moy
2011-09-01 19:50 ` Shawn Pearce
2011-09-02 5:55 ` Matthieu Moy
2011-09-02 0:00 ` Jeff King
2011-09-02 7:00 ` Johannes Sixt
2011-09-02 15:26 ` Jeff King
2011-09-02 7:42 ` Michael J Gruber
2011-09-02 15:29 ` Jeff King
2011-09-02 16:14 ` Junio C Hamano
2011-09-02 16:25 ` Jeff King [this message]
2011-09-02 16:47 ` Junio C Hamano
2011-09-05 18:15 ` Shawn Pearce
2011-09-05 20:47 ` Jeff King
2011-09-05 20:53 ` Shawn Pearce
2011-09-05 20:57 ` Jeff King
2011-09-05 21:14 ` Shawn Pearce
2011-09-07 21:20 ` [RFC/PATCH] fetch: bigger forced-update warnings Jeff King
2011-09-07 21:39 ` Shawn Pearce
2011-09-07 21:53 ` Junio C Hamano
2011-09-07 21:57 ` Jeff King
2011-09-07 22:42 ` Thomas Rast
2011-09-06 7:39 ` Dropping '+' from fetch = +refs/heads/*:refs/remotes/origin/*? Matthieu Moy
2011-09-06 7:51 ` Michael J Gruber
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=20110902162524.GC19690@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).