Add uploadpack configuration info to remote.
authorDaniel Barkalow <barkalow@iabervon.org>
Tue, 11 Sep 2007 03:02:51 +0000 (23:02 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Sep 2007 10:22:30 +0000 (03:22 -0700)
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c
remote.h

index bb774d0bcc3f5b3e7a8cdbb29ba43fcaf00f0d4c..a8196b1b5dd20b119143fa22e2cdf204f1acd212 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -196,6 +196,11 @@ static int handle_config(const char *key, const char *value)
                        remote->receivepack = xstrdup(value);
                else
                        error("more than one receivepack given, using the first");
+       } else if (!strcmp(subkey, ".uploadpack")) {
+               if (!remote->uploadpack)
+                       remote->uploadpack = xstrdup(value);
+               else
+                       error("more than one uploadpack given, using the first");
        }
        return 0;
 }
index 17b8b5b5d5469419842be3d41d528ba88c987a3e..72c91537839e6c31d6063035da0f52af245d7d58 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -16,6 +16,7 @@ struct remote {
        int fetch_refspec_nr;
 
        const char *receivepack;
+       const char *uploadpack;
 };
 
 struct remote *remote_get(const char *name);