[darcs-devel] darcs and git and the linux kernel

David Roundy droundy at abridgegame.org
Fri Apr 15 04:24:23 PDT 2005


On Thu, Apr 14, 2005 at 08:04:47PM +0200, Juliusz Chroboczek wrote:
> > Juliusz, any chance you'd be interested?  [...] The question is one
> > of time and interest...
> 
> It's a question of time, not interest -- Real Work has caught up with
> me.  I'll try to have a look at git this week-end, and think about it.
>
> I'll get back to you this week-end.

The "directory cache" (called .git/index) which is something like a
single-file _darcs/current/, which I'm thinking may involve code that we
could reuse.  This would be less ambitious than using git to store all the
old versions, but should give a speed improvement (it would eliminate calls
to readdir, except when running with --look-for-adds).  It wouldn't be any
more than the hypothetical database version of _darcs/current, except that
there's now an existing "database" that is designed to serve the same
function as what we want.  And it would certainly make a git gateway
easier, since git requires that all changes be "checked in" to a directory
cache, before being "recorded".

There's a nice summary of git in the latest LWN, if you subscribe
(http://lwn.net/Articles/130865/).  I think it's within "fair use" to
quote one paragraph:

"The directory cache is a single, binary file containing a tree object; it
captures the state of the directory tree at a given time. The state as seen
by the cache might not match the actual directory's contents; it could
differ as a result of local changes, or of a "pull" of a repository from
elsewhere."

This doesn't mention that the cache stores the inode numbers, file
modification dates, and whatever else might possibly be useful in knowing
whether a file has been touched.  Plus, there's already-written and *very*
*fast* code to do things like sync with the working directory and see which
files have been changed.

But if you don't have time, I'm sure someone else can step up to work on
this--just not as easily as you could.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list