summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/pack-objects.c4
-rw-r--r--sha1_file.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index de36c60ca1..8861b88be4 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -960,10 +960,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;
}
diff --git a/sha1_file.c b/sha1_file.c
index 3e9f55f1bb..fef54a8811 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2441,10 +2441,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);