peru icon indicating copy to clipboard operation
peru copied to clipboard

Changing the cache can cause "failed to unpack tree object" errors

Open oconnor663 opened this issue 10 years ago • 2 comments

Say you run peru sync and then you change the value of PERU_CACHE and run peru sync again. The lastimports file will contain a reference to a tree that's not in your new cache, and you'll get a git error. We should detect this case ("hey, it looks like your last imports tree is no longer in cache") and allow the --force flag to just pave over everything.

oconnor663 avatar Aug 19 '14 20:08 oconnor663

Maybe the right way to fix this is to check that a tree hash is present in the cache repo after retrieving it from the keyval. If not, just return None instead of returning the invalid tree.

oconnor663 avatar Sep 07 '15 16:09 oconnor663

I feel like I'm seeing this issue occasionally, even though I've had PERU_CACHE_DIR=/home/jacko/.peru-cache for many months. Is there some git cleanup process that might be removing unreferenced trees?

oconnor663 avatar May 03 '16 01:05 oconnor663