git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Jeff King <peff@peff.net>
Cc: Toolforger <toolforger@durchholz.org>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: url.<base>.insteadOf vs. submodules
Date: Tue, 21 Feb 2017 16:10:03 -0800	[thread overview]
Message-ID: <CAGZ79kZRZz8h8cfrzsOPH+YT7QdF9vQ3C3XBZfGA1SaF+1mEzw@mail.gmail.com> (raw)
In-Reply-To: <20170221234037.ga44u3birwd5whab@sigill.intra.peff.net>

On Tue, Feb 21, 2017 at 3:40 PM, Jeff King <peff@peff.net> wrote:

>> > One other caveat: I'm not sure if we do insteadOf recursively, but it
>> > may be surprising to the child "git clone" that we've already applied
>> > the insteadOf rewriting (especially if the rules are coming from
>> > ~/.gitconfig and may be applied twice).
>>
>> When a rule is having effect twice the rule sounds broken. (the outcome
>> ought to be sufficiently different from the original?)
>
> If you have:
>
>   url.bar.insteadOf=foo
>   url.baz.insteadOf=bar
>
> do we convert "foo" to "baz"? If so, then I think applying the rules
> again shouldn't matter. But if we don't, and only do a single level,
> then having the caller rewrite the URL before it hands it to "git clone"
> means we may end up unexpectedly doing two levels of rewriting.
>

I see. Thanks for the example. So really what we want is to record the
unencumbered URL (with no rewriting) and then at run time lookup various
places of url.*.insteadOf (which might change with the git version
that you use)

Thanks,
Stefan

      reply	other threads:[~2017-02-22  0:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 21:12 url.<base>.insteadOf vs. submodules Toolforger
2017-02-20  9:01 ` Jeff King
2017-02-20 20:31   ` Toolforger
2017-02-20 20:52     ` Jeff King
2017-02-21  5:11       ` Toolforger
2017-02-21  7:06         ` Jeff King
2017-02-21 18:19           ` Stefan Beller
2017-02-21 23:00             ` Jeff King
2017-02-21 23:16               ` Stefan Beller
2017-02-21 23:37                 ` Junio C Hamano
2017-02-21 23:59                   ` Junio C Hamano
2017-02-22  0:07                   ` Stefan Beller
2017-02-22  2:59                     ` Junio C Hamano
2017-02-22 14:00                       ` Jon Loeliger
2017-02-22 17:36                         ` Junio C Hamano
2017-02-22 18:57                           ` Jeff King
2017-02-22 19:11                             ` Stefan Beller
2017-02-21 23:40                 ` Jeff King
2017-02-22  0:10                   ` Stefan Beller [this message]

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=CAGZ79kZRZz8h8cfrzsOPH+YT7QdF9vQ3C3XBZfGA1SaF+1mEzw@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=toolforger@durchholz.org \
    /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).