http: respect protocol.*.allow=user for http-alternates
[gitweb.git] / fetch-pack.c
index 6239a61a1c399afe3fd18a4862ad76ce728b81ac..b501d5c320a5117020a934a50fce2a356b0c2f0e 100644 (file)
@@ -169,7 +169,7 @@ static const unsigned char *get_rev(void)
                }
        }
 
-       return get_object_hash(commit->object);
+       return commit->object.oid.hash;
 }
 
 enum ack_type {
@@ -487,7 +487,7 @@ static int mark_complete(const unsigned char *sha1)
                if (!t->tagged)
                        break; /* broken repository */
                o->flags |= COMPLETE;
-               o = parse_object(get_object_hash(*t->tagged));
+               o = parse_object(t->tagged->oid.hash);
        }
        if (o && o->type == OBJ_COMMIT) {
                struct commit *commit = (struct commit *)o;
@@ -671,8 +671,9 @@ static int everything_local(struct fetch_pack_args *args,
 static int sideband_demux(int in, int out, void *data)
 {
        int *xd = data;
+       int ret;
 
-       int ret = recv_sideband("fetch-pack", xd[0], out);
+       ret = recv_sideband("fetch-pack", xd[0], out);
        close(out);
        return ret;
 }
@@ -697,6 +698,7 @@ static int get_pack(struct fetch_pack_args *args,
                demux.proc = sideband_demux;
                demux.data = xd;
                demux.out = -1;
+               demux.isolate_sigpipe = 1;
                if (start_async(&demux))
                        die("fetch-pack: unable to fork off sideband"
                            " demultiplexer");