user-manual: replace init-db by init
[gitweb.git] / upload-pack.c
index 4a9d6720a5a0e9977bd9346e649666ead4e18fe4..c568ef066c9e7e0021468cfe7cb904f40ac477f1 100644 (file)
@@ -1,6 +1,3 @@
-#include <signal.h>
-#include <sys/wait.h>
-#include <sys/poll.h>
 #include "cache.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -138,6 +135,7 @@ static void create_pack_file(void)
                } else {
                        for (i = 0; i < want_obj.nr; i++) {
                                struct object *o = want_obj.objects[i].item;
+                               /* why??? */
                                o->flags &= ~UNINTERESTING;
                                add_pending_object(&revs, o, NULL);
                        }
@@ -564,7 +562,7 @@ static void receive_needs(void)
                        SHALLOW, NOT_SHALLOW);
                while (result) {
                        struct object *object = &result->item->object;
-                       if (!(object->flags & CLIENT_SHALLOW)) {
+                       if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) {
                                packet_write(1, "shallow %s",
                                                sha1_to_hex(object->sha1));
                                register_shallow(object->sha1);
@@ -581,6 +579,7 @@ static void receive_needs(void)
                                object->flags &= ~CLIENT_SHALLOW;
                                /* make sure the real parents are parsed */
                                unregister_shallow(object->sha1);
+                               object->parsed = 0;
                                parse_commit((struct commit *)object);
                                parents = ((struct commit *)object)->parents;
                                while (parents) {