To graft or not to graft... (Re: Recovering from repository corruption)
- From
Stephen R. van den Berg <srb@cuci.nl>
- Date
- Jun 11, 2008, 23:21 UTC
- Message-ID
- <20080611232126.GA9054@cuci.nl>
- In-Reply-To
- <alpine.LFD.1.10.0806101403080.3101@woody.linux-foundation.org>
Linus Torvalds wrote:
>more corruption by hiding things (ie if you clone a repo with a grafts >file, the result will now have neither the grafts file _nor_ the state >that was hidden by it, so the result is guaranteed to be corrupt).
This is kind of confusing. As I understood it from the few shreds of documentation that actually mention the grafts file, the grafts file is *not* being cloned. Therefore, my assumption was that cloning a repository that has a grafts file gives an identical result to cloning the same repository *without* the grafts file present.
As I understand it now, the cloning process actually peeks at the grafts file while cloning, and then doesn't copy it. This results in a rather confusingly corrupt clone.
I suggest two things: a. That during the cloning process, the grafts file is completely disregarded in any case at first. b. Preferably the grafts file is copied as well (after cloning). I never really understood why the file is not being copied in the first place (anyone care to explain that?).
--
Sincerely,
Stephen R. van den Berg.
Differentiation is an integral part of calculus.