Merge branch 'jk/sha1-file-reduce-useless-warnings' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:00:07 +0000 (12:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:00:07 +0000 (12:00 -0700)
* jk/sha1-file-reduce-useless-warnings:
sha1_file: squelch "packfile cannot be accessed" warnings

builtin/pack-objects.c
sha1_file.c
index c3a75166bd10918d21d3df19832880c4373dc8d7..c067107a6a6b8d6f797854d1e3a7cc9ce5da0cdc 100644 (file)
@@ -961,10 +961,8 @@ static int want_object_in_pack(const unsigned char *sha1,
                off_t offset = find_pack_entry_one(sha1, p);
                if (offset) {
                        if (!*found_pack) {
-                               if (!is_pack_valid(p)) {
-                                       warning("packfile %s cannot be accessed", p->pack_name);
+                               if (!is_pack_valid(p))
                                        continue;
-                               }
                                *found_offset = offset;
                                *found_pack = p;
                        }
index 47f56f2e89d99b58a6d43bb44828c442577424cf..001537c9359bf83fdc4d6c59426a25424be2e803 100644 (file)
@@ -2473,10 +2473,8 @@ static int fill_pack_entry(const unsigned char *sha1,
         * answer, as it may have been deleted since the index was
         * loaded!
         */
-       if (!is_pack_valid(p)) {
-               warning("packfile %s cannot be accessed", p->pack_name);
+       if (!is_pack_valid(p))
                return 0;
-       }
        e->offset = offset;
        e->p = p;
        hashcpy(e->sha1, sha1);