summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorFinn Arne Gangstad <finnag@pvv.org>2009-04-06 15:41:01 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-07 21:51:59 -0700
commit9a23ba3375e2afa8045a433a3debce99c373beb2 (patch)
treefc41723967648256079a56c42a0e0fc55babfcef /remote.h
parentbed5d42163ec2e2ddde3b1d78d303a4fb39bc0d0 (diff)
downloadgit-9a23ba3375e2afa8045a433a3debce99c373beb2.tar.gz
remote: New function remote_is_configured()
Previously, there was no easy way to check for the existence of a configured remote. remote_get for example would always create the remote "on demand". This new function returns 1 if the remote is configured, 0 otherwise. Signed-off-by: Finn Arne Gangstad <finnag@pvv.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote.h b/remote.h
index de3d21b662..99706a89bc 100644
--- a/remote.h
+++ b/remote.h
@@ -45,6 +45,7 @@ struct remote {
};
struct remote *remote_get(const char *name);
+int remote_is_configured(const char *name);
typedef int each_remote_fn(struct remote *remote, void *priv);
int for_each_remote(each_remote_fn fn, void *priv);