Code

unexpected Make output (e.g. from --debug) causes build failure
[git.git] / upload-pack.c
index 498bf50eb86f9e437dae89fc631499b73a8ec116..fe96ef15c43fa6e3f8f947f84ddce3c498e82859 100644 (file)
@@ -62,7 +62,7 @@ static ssize_t send_client_data(int fd, const char *data, ssize_t sz)
        return safe_write(fd, data, sz);
 }
 
-FILE *pack_pipe = NULL;
+static FILE *pack_pipe = NULL;
 static void show_commit(struct commit *commit)
 {
        if (commit->object.flags & BOUNDARY)
@@ -119,6 +119,7 @@ static void create_pack_file(void)
                int i;
                struct rev_info revs;
 
+               close(lp_pipe[0]);
                pack_pipe = fdopen(lp_pipe[1], "w");
 
                if (create_full_pack)
@@ -677,7 +678,7 @@ int main(int argc, char **argv)
                        break;
                }
        }
-       
+
        if (i != argc-1)
                usage(upload_pack_usage);
        dir = argv[i];