On Mon, 14 Jul 2008, Junio C Hamano wrote: > Nicolas Pitre <nico@xxxxxxx> writes: > > > It is those with semantic meaning (e.g. object doesn't exist) which > > should be audited, especially if used in the context of repository > > modification, which pretty much limits it to the test case I produced. > > I've been wondering if we should make the change 8eca0b4 (implement some > resilience against pack corruptions, 2008-06-23) less aggressive. > > It makes loose objects and data from other packs to be used as fallback > where we used to just punt, which is a genuine improvement for "salvaging" > mode of operation, but at the same time, it now forbids the callers to > expect that the objects they learned to exist from has_sha1_file() or > nth_packed_object_sha1() should never result NULL return value from > read_sha1_file(). > > It may make it safe again to fail if you cannot salvage using fallback > method after all. Something like the attached. Well, I have a different solution which should restore the original "behavior" in the presence of existing but non-readable objects. Patch will follow later. Nicolas -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html