downgrade "packfile cannot be accessed" errors to warnings
These can happen if another process simultaneously prunes a pack. But that is not usually an error condition, because a properly-running prune should have repacked the object into a new pack. So we will notice that the pack has disappeared unexpectedly, print a message, try other packs (possibly after re-scanning the list of packs), and find it in the new pack. Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4c08018204
commit
58a6a9cc43
@ -805,7 +805,7 @@ static int add_object_entry(const unsigned char *sha1, enum object_type type,
|
|||||||
if (offset) {
|
if (offset) {
|
||||||
if (!found_pack) {
|
if (!found_pack) {
|
||||||
if (!is_pack_valid(p)) {
|
if (!is_pack_valid(p)) {
|
||||||
error("packfile %s cannot be accessed", p->pack_name);
|
warning("packfile %s cannot be accessed", p->pack_name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
found_offset = offset;
|
found_offset = offset;
|
||||||
|
@ -2035,7 +2035,7 @@ static int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
|
|||||||
* was loaded!
|
* was loaded!
|
||||||
*/
|
*/
|
||||||
if (!is_pack_valid(p)) {
|
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;
|
goto next;
|
||||||
}
|
}
|
||||||
e->offset = offset;
|
e->offset = offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user