Imported Upstream version 2.12.4
[platform/upstream/git.git] / credential-cache.c
index 8689a15..cc8a6ee 100644 (file)
@@ -32,6 +32,7 @@ static int send_request(const char *socket, const struct strbuf *out)
                write_or_die(1, in, r);
                got_data = 1;
        }
+       close(fd);
        return got_data;
 }
 
@@ -82,13 +83,13 @@ static void do_cache(const char *socket, const char *action, int timeout,
        strbuf_release(&buf);
 }
 
-int main(int argc, const char **argv)
+int cmd_main(int argc, const char **argv)
 {
        char *socket_path = NULL;
        int timeout = 900;
        const char *op;
        const char * const usage[] = {
-               "git credential-cache [options] <action>",
+               "git credential-cache [<options>] <action>",
                NULL
        };
        struct option options[] = {