Merge branch 'sb/submodule-module-list-fix' into maint
[gitweb.git] / fetch-pack.c
index 7c8cbbf3342ca8d90e86151bd963e7b509fd7106..f96f6dfb35afb419ac38fcec9b4013fbf0e6d36d 100644 (file)
@@ -15,6 +15,7 @@
 #include "version.h"
 #include "prio-queue.h"
 #include "sha1-array.h"
+#include "sigchain.h"
 
 static int transfer_unpack_limit = -1;
 static int fetch_unpack_limit = -1;
@@ -169,7 +170,7 @@ static const unsigned char *get_rev(void)
                }
        }
 
-       return get_object_hash(commit->object);
+       return commit->object.oid.hash;
 }
 
 enum ack_type {
@@ -487,7 +488,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;
@@ -511,7 +512,7 @@ static void mark_recent_complete_commits(struct fetch_pack_args *args,
        while (complete && cutoff <= complete->item->date) {
                if (args->verbose)
                        fprintf(stderr, "Marking %s as complete\n",
-                               sha1_to_hex(complete->item->object.sha1));
+                               oid_to_hex(&complete->item->object.oid));
                pop_most_recent_commit(&complete, COMPLETE);
        }
 }
@@ -671,9 +672,12 @@ 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);
+       sigchain_push(SIGPIPE, SIG_IGN);
+       ret = recv_sideband("fetch-pack", xd[0], out);
        close(out);
+       sigchain_pop(SIGPIPE);
        return ret;
 }