builtin/merge.c: drop a parameter that is never used
[gitweb.git] / fetch-pack.c
index a0e0350ae6bdf338b3c11c21fc050edb60c88569..fab5e801755a9152aa19baf72b609052e1b32035 100644 (file)
@@ -507,7 +507,7 @@ static void filter_refs(struct fetch_pack_args *args,
                next = ref->next;
 
                if (!memcmp(ref->name, "refs/", 5) &&
-                   check_refname_format(ref->name + 5, 0))
+                   check_refname_format(ref->name, 0))
                        ; /* trash */
                else {
                        while (i < nr_sought) {
@@ -747,6 +747,10 @@ static int get_pack(struct fetch_pack_args *args,
                close(cmd.out);
        }
 
+       if (!use_sideband)
+               /* Closed by start_command() */
+               xd[0] = -1;
+
        ret = finish_command(&cmd);
        if (!ret || (args->check_self_contained_and_connected && ret == 1))
                args->self_contained_and_connected =