gh <bugs@darcs.net> writes:
> But one remark: if "darcs check" says "repo is consistent" and the
> "darcs obliterate" crashes, isn't it the case that "darcs check" should
> have checked harder? Maybe there is a way to make "darcs check" detect
> that the file Setup.hs was missing?
That's indeed interesting... if I remove a file from pristine.hashed
manually and then darcs check, it indeed complains...
Ok, I see: check is only consulting the pristine hashes, not the file
contents themselves. So even though it can't look into the hashed file
that's missing, it has its hash and concludes it's the right file (since
the hash matches).
It may be worth making the checking stricter (i.e. apart from checking
that hashes are OK, also check for each pristine file, that the hash
corresponds to the content of the file...).
Care to file a new issue for this? Feel free to quote freely.
Yours,
Petr.
|