summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:33 (GMT)
commit207095063379065f2894c091c8909269a00ed44a (patch)
tree0e117b5b75a459622282fd65510b54978a2d2458 /sha1_file.c
parente75a59adfcc4fd048690e5b25f9a8c31d8011d53 (diff)
parent58a6a9cc4397477a7d8b620165e651028cc0e3c9 (diff)
downloadgit-207095063379065f2894c091c8909269a00ed44a.zip
git-207095063379065f2894c091c8909269a00ed44a.tar.gz
git-207095063379065f2894c091c8909269a00ed44a.tar.bz2
Merge branch 'jk/maint-pack-objects-compete-with-delete'
* jk/maint-pack-objects-compete-with-delete: downgrade "packfile cannot be accessed" errors to warnings pack-objects: protect against disappearing packs
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 3401301..27f3b9b 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1987,7 +1987,7 @@ off_t find_pack_entry_one(const unsigned char *sha1,
return 0;
}
-static int is_pack_valid(struct packed_git *p)
+int is_pack_valid(struct packed_git *p)
{
/* An already open pack is known to be valid. */
if (p->pack_fd != -1)
@@ -2038,7 +2038,7 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
* was loaded!
*/
if (!is_pack_valid(p)) {
- error("packfile %s cannot be accessed", p->pack_name);
+ warning("packfile %s cannot be accessed", p->pack_name);
goto next;
}
e->offset = offset;