Add branch --set-upstream
[gitweb.git] / transport.c
index b5332c018b2951f63b15f51a3e3fb00999532a96..c3f156ea04636a722a49aca225175a6f9e9259c9 100644 (file)
@@ -143,7 +143,7 @@ static const char *rsync_url(const char *url)
 static struct ref *get_refs_via_rsync(struct transport *transport, int for_push)
 {
        struct strbuf buf = STRBUF_INIT, temp_dir = STRBUF_INIT;
-       struct ref dummy, *tail = &dummy;
+       struct ref dummy = {0}, *tail = &dummy;
        struct child_process rsync;
        const char *args[5];
        int temp_dir_len;
@@ -478,7 +478,7 @@ static int fetch_refs_via_pack(struct transport *transport,
        args.include_tag = data->options.followtags;
        args.verbose = (transport->verbose > 0);
        args.quiet = (transport->verbose < 0);
-       args.no_progress = args.quiet || (!transport->progress && !isatty(1));
+       args.no_progress = args.quiet || (!transport->progress && !isatty(2));
        args.depth = data->options.depth;
 
        for (i = 0; i < nr_heads; i++)