summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-11 14:23:40 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-11 14:23:41 -0700
commitcedeffeee06f7ae5982aa5e08fad78a90c4331bf (patch)
tree25529010e1eb7d61322214af3c3ba72cba40f30c
parent68a2e6a2c80303144807c8c91a087427e3c8e727 (diff)
parent319b678a7b7c7fd03242b2b91d936f65e798cd06 (diff)
downloadgit-cedeffeee06f7ae5982aa5e08fad78a90c4331bf.tar.gz
Merge branch 'jk/sha1-file-reduce-useless-warnings'
* jk/sha1-file-reduce-useless-warnings: sha1_file: squelch "packfile cannot be accessed" warnings
-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 c3a75166bd..c067107a6a 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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;
}
diff --git a/sha1_file.c b/sha1_file.c
index 47c4929eb7..7634917e4e 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -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);