From: Jeff King <peff@peff.net>
To: Toolforger <toolforger@durchholz.org>
Cc: git@vger.kernel.org
Subject: Re: url.<base>.insteadOf vs. submodules
Date: Tue, 21 Feb 2017 02:06:54 -0500 [thread overview]
Message-ID: <20170221070653.65ho2anbp55uzjeu@sigill.intra.peff.net> (raw)
In-Reply-To: <28fb85d4-89cd-1f32-3063-2f48d8b935be@durchholz.org>
On Tue, Feb 21, 2017 at 06:11:51AM +0100, Toolforger wrote:
> > I'm not sure I understand. You have a project policy to use certain
> > URLs. But you, the user, want to override that. Why isn't the
> > user-specific config file the right place to put that?
>
> Ah right, I mistook ~/ for "project root" instead of "home dir".
> Sorry for the confusion.
Ah, OK, that makes more sense.
> > (I think there _is_ a mismatch, in that the change is specific not just
> > to your user, but to the repo. So you would not want to rewrite other
> > references to the same URL in other repos.
>
> Indeed, and that's actually a problem.
>
> The setup I'm aiming for is
> github -> local bare repo -> local clones with worktrees
>
> If I place insteadOf rules in ~/.gitconfig, I will be unable to pull from
> github to my local bare repos.
> Mmm... I could try to undo the insteadOf configuration from ~/.gitconfig in
> the local bare repos. Not sure whether I have to redirect from the github
> URL to itself.
Yeah, I think you would probably have to do a redirect-to-self to
override the global one.
At one point we discussed having conditional-config that would kick in
based on path-matching. I think it would be another way to do what you
want, but there's nothing merged.
I think anything involving ~/.gitconfig is basically a hack, though.
What you really want is for submodules to better support your
URL-rewriting case, and that's not an unreasonable thing to want.
We'll see if the submodule folks have any ideas on how to implement
that.
-Peff
next prev parent reply other threads:[~2017-02-21 7:08 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 [this message]
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
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170221070653.65ho2anbp55uzjeu@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).