From: Eric Brunson <brunson@brunson.com>
To: git@vger.kernel.org
Subject: Unexpected behavior using -c to pass url.<site>.insteadof
Date: Thu, 08 May 2014 16:35:26 -0600 [thread overview]
Message-ID: <536C06AE.1080103@brunson.com> (raw)
Is this the expected operation using git -c to override gitconfig settings?
This is default behavior:
$ git ls-remote git://original.site/origin
fatal: unable to connect to original.site:
This is what I expected, override with an insteadof url using -c on the
command line:
$ git -c
url.ssh://replace.site:1234/.insteadof=git://original.site/ ls-remote
git://original.site/origin
ssh: Could not resolve hostname replace.site: Name or service not known
Create a URL in ~/.gitconfig:
$ git config --global url.ssh://other.site/.insteadof
git://original.site/
$ cat ~/.gitconfig
[url "ssh://other.site/"]
insteadof = git://original.site/
Works as expected, correctly substitutes other.site for original.site:
$ git ls-remote git://original.site/origin
ssh: Could not resolve hostname other.site: Name or service not known
The same -c command as above doesn't override the ~/.gitconfig setting,
still substitutes other.site:
$ git -c
url.ssh://replace.site:1234/.insteadof=git://original.site/ ls-remote
git://original.site/origin
ssh: Could not resolve hostname other.site: Name or service not known
I've also reproduced in git 1.9.0 and 2.0.0-rc2.
Am I simply misunderstanding the documentation, it doesn't really
discuss what should happen with multivar settings?
Thanks,
e.
reply other threads:[~2014-05-08 22:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=536C06AE.1080103@brunson.com \
--to=brunson@brunson.com \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.