fetch() assumes we do not have the object.
authorJunio C Hamano <junkio@cox.net>
Sun, 18 Sep 2005 21:11:53 +0000 (14:11 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 18 Sep 2005 21:11:53 +0000 (14:11 -0700)
Bugfix for the previous one.

Signed-off-by: Junio C Hamano <junkio@cox.net>
fetch.c

diff --git a/fetch.c b/fetch.c
index 1d95ce0..af9a013 100644 (file)
--- a/fetch.c
+++ b/fetch.c
@@ -174,7 +174,7 @@ static int loop(void)
                 * the queue because we needed to fetch it first.
                 */
                if (! (obj->flags & TO_SCAN)) {
-                       if (fetch(obj->sha1)) {
+                       if (!has_sha1_file(obj->sha1) && fetch(obj->sha1)) {
                                report_missing(obj->type
                                               ? obj->type
                                               : "object", obj->sha1);