Remove unnecessary git-rm --cached reference from status output
[gitweb.git] / upload-pack.c
index 7e3c437d8e1eaca61ccabb29f3097ba9c5c3732e..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"
@@ -565,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);
@@ -582,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) {