]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Make networking commands to work from a subdirectory.
authorJunio C Hamano <junkio@cox.net>
Sat, 26 Nov 2005 08:47:59 +0000 (00:47 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 29 Nov 2005 07:13:02 +0000 (23:13 -0800)
These are whole-tree operations and there is not much point
making them operable from within a subdirectory, but it is easy
to do so, and using setup_git_directory() upfront helps git://
proxy specification picked up from the correct place.

Signed-off-by: Junio C Hamano <junkio@cox.net>
clone-pack.c
fetch-pack.c
http-fetch.c
http-push.c
local-fetch.c
send-pack.c
ssh-fetch.c
ssh-upload.c

index 960921903eaa712523af0b03098970127729f363..a99a95c5f26718bd509a1c8906663fd73447f16d 100644 (file)
@@ -271,6 +271,8 @@ int main(int argc, char **argv)
        int fd[2];
        pid_t pid;
 
+       setup_git_directory();
+
        nr_heads = 0;
        heads = NULL;
        for (i = 1; i < argc; i++) {
index 65659826601eb9c850266539f6c9e7807a0b467e..58ba2094dc6eda7e0429cf83730f8c4c84e4c084 100644 (file)
@@ -424,6 +424,8 @@ int main(int argc, char **argv)
        int fd[2];
        pid_t pid;
 
+       setup_git_directory();
+
        nr_heads = 0;
        heads = NULL;
        for (i = 1; i < argc; i++) {
index 435317342be0d31088f5aae5b337e090b40199b5..ad59f1cce61d73fa832828aabb880f082debf94d 100644 (file)
@@ -922,6 +922,8 @@ int main(int argc, char **argv)
        int arg = 1;
        int rc = 0;
 
+       setup_git_directory();
+
        while (arg < argc && argv[arg][0] == '-') {
                if (argv[arg][1] == 't') {
                        get_tree = 1;
index ad789829c1c33e00cbcc9e1e1564e645755d49ab..c6e782cbed88edd68a764eac2f86887758dbec00 100644 (file)
@@ -1239,6 +1239,7 @@ int main(int argc, char **argv)
        int rc = 0;
        int i;
 
+       setup_git_directory();
        setup_ident();
 
        remote = xmalloc(sizeof(*remote));
index 0931109143e0ce1c2f03f654b3ab67965220011a..fa9e697fd3fa8fe305184f78fdf500532c14ab63 100644 (file)
@@ -207,6 +207,8 @@ int main(int argc, char **argv)
        char *commit_id;
        int arg = 1;
 
+       setup_git_directory();
+
        while (arg < argc && argv[arg][0] == '-') {
                if (argv[arg][1] == 't')
                        get_tree = 1;
index 3eeb18f7c7d32412003ea665a47081dc06d84c95..2a14b00845c0211a0ddb38dad892ff2be0fdc8cc 100644 (file)
@@ -273,6 +273,7 @@ int main(int argc, char **argv)
        int fd[2], ret;
        pid_t pid;
 
+       setup_git_directory();
        argv++;
        for (i = 1; i < argc; i++, argv++) {
                char *arg = *argv;
index bf01fbc00d649231cb7ba49aba9432afe570b319..4eb9e04829b5925ea07c764239f91e801e158c78 100644 (file)
@@ -131,6 +131,8 @@ int main(int argc, char **argv)
        prog = getenv("GIT_SSH_PUSH");
        if (!prog) prog = "git-ssh-upload";
 
+       setup_git_directory();
+
        while (arg < argc && argv[arg][0] == '-') {
                if (argv[arg][1] == 't') {
                        get_tree = 1;
index 603abcc8c3da9029a50fb7a2e76b0d6f70e2abeb..b675a0b1f1df7d313f8201d59ad25b1c3d53a2f4 100644 (file)
@@ -121,6 +121,9 @@ int main(int argc, char **argv)
 
        prog = getenv(COUNTERPART_ENV_NAME);
        if (!prog) prog = COUNTERPART_PROGRAM_NAME;
+
+       setup_git_directory();
+
        while (arg < argc && argv[arg][0] == '-') {
                if (argv[arg][1] == 'w')
                        arg++;