Re: Core and Not-So Core
- From
Petr Baudis <pasky@ucw.cz>
- Date
- May 10, 2005, 22:52 UTC
- Message-ID
- <20050510225235.GD26384@pasky.ji.cz>
- In-Reply-To
- <2cfc40320505100800426d38ca@mail.gmail.com>
Dear diary, on Tue, May 10, 2005 at 05:00:33PM CEST, I got a letter where Jon Seymour <jon.seymour@gmail.com> told me that...
> One thing I noticed when doing this is that the present index/cache > structure is rather arbitrary and the optimum index structure is > determined by the structure of the tools that use a GIT repository > rather than the structure of the GIT repository itself.
Yes. And that's how it should be - the directory cache is just that - a _cache_. It does not hold any permanent information, merely serves to record git tools' working state relative to the given working tree. So unlike the objects database which has well-defined format and is supposed to be "public", you should view the directory cache as internal git tools' structure. If you want to mess with it too, either use the proper level of abstraction and call the git tools, or don't mess with it at all. And you need to care about it only if you want the git tools working on the same tree properly too - so in that case use the git tools too.
From your arguments, it's not clear to me what really is the big problem with the git tools. They are _designed_ for automatic use instead of human interaction - you can perceive them just as methods with funny (but actually friendly to your programs) calling convention.
Kind regards,
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor