Why doesn't git-fetch obey -c "remote.origin.url" on the command-line?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a git built from the master branch just now:

 $ ./git config remote.origin.url
https://code.google.com/p/git-core/
$ ./git -c remote.origin.url=git://git.sourceforge.jp/gitroot/git-core/git.git
config remote.origin.url
git://git.sourceforge.jp/gitroot/git-core/git.git
$ GIT_TRACE=1 ./git -c
remote.origin.url=git://git.sourceforge.jp/gitroot/git-core/git.git
fetch 2>&1 | head -n 2
trace: built-in: git 'fetch'
trace: run_command: 'git-remote-https' 'origin'
'https://code.google.com/p/git-core/'

I'd expect this to try to fetch from the remote.origin.url I specified
on the command-line, but for some reason fetch doesn't pick that up.
Isn't this a bug?

The use case for this is to have a script in cron that does a pull of
repositories via http while the developers expecting to occasionally
use those repositories as work directories should transparently be
able to pull/push from them.

I know about remote.origin.pushurl, but I'd prefer pulls to also be
over ssh in those cases, because then you don't have to worry about
proxy settings (different for the devs & that automated script).

I could fix this, but I thought I'd first send a question about
whether this shouldn't be considered a bug, and I haven't dug into
this yet but I think that configuration passed via the -c option
should *always* override any other config Git may get from elsewhere.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]