[PATCH 4/7] Allow both url and foreign vcs in remote config
- From
Sverre Rabbelier <srabbelier@gmail.com>
- Date
- Oct 29, 2009, 06:40 UTC
- Message-ID
- <1256798426-21816-5-git-send-email-srabbelier@gmail.com>
- In-Reply-To
- <1256798426-21816-1-git-send-email-srabbelier@gmail.com>
The current logic prevents both 'remote.url' and 'remote.vcs' from being set, while that might be useful.
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> ---
This way I can do:
remote.hgremote.url = /path/to/hg/repo remote.hgremote.vcs = hg
As well as:
remote.hgremote.url = hg::/path/to/hg/repo
remote.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/remote.c b/remote.c index f0441c4..29365de 100644 --- a/remote.c +++ b/remote.c @@ -50,7 +50,7 @@ static char buffer[BUF_SIZE]; static int valid_remote(const struct remote *remote) { - return !remote->url != !remote->foreign_vcs; + return (!!remote->url) || (!!remote->foreign_vcs); } static const char *alias_url(const char *url)
-- 1.6.5.2.291.gf76a3