]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
Give error when no remote is configured
authorDaniel Barkalow <barkalow@iabervon.org>
Wed, 11 Mar 2009 05:47:20 +0000 (01:47 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Mar 2009 06:14:20 +0000 (23:14 -0700)
commitfa685bdf45cbaa997255cc78a23494b995e9769a
tree9d9105e85bc7477e6a4c93091c511f3191d22b60
parent9a6682bab5e800465f0a4e44cdf18fe396ff4f6d
Give error when no remote is configured

When there's no explicitly-named remote, we use the remote specified
for the current branch, which in turn defaults to "origin". But it
this case should require the remote to actually be configured, and not
fall back to the path "origin".

Possibly, the config file's "remote = something" should require the
something to be a configured remote instead of a bare repository URL,
but we actually test with a bare repository URL.

In fetch, we were giving the sensible error message when coming up
with a URL failed, but this wasn't actually reachable, so move that
error up and use it when appropriate.

In push, we need a new error message, because the old one (formerly
unreachable without a lot of help) used the repo name, which was NULL.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch.c
builtin-push.c
remote.c