[darcs-devel] Expanding Slurpy

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Sat Apr 30 06:44:39 PDT 2005


> Currently we have an undefined_time, which is equal to -1, and an
> undefined_size, which is also equal to -1.

Ah, right.  That does it.

> I think I'd prefer if were called githash (and I'm thinking this would be a
> good opportunity to switch to using named fields).  Thus we could (in
> principle) also have a monotone_hash, which at least for directories would
> probably be different...

It doesn't matter at all.  Hashes are only compared for equality, as a
heuristic to avoid comparing file contents ; if the Git backend
produces hash "abcd" and a monotone backend produces "1234", then the
two hashes will compare as distinct, and the file contents will be
compared, as they should be.

(I'm not planning to trust the hashes when writing files out; I rehash
everything on record.)

Since a Slurpy originates with at most one backend, there's no way how
it can have multiple hashes simultaneously.

> data FileMetaData = FMD {mod_time :: Maybe EpochTime,
>                          file_length :: !FileOffset,
>                          git_hash :: Maybe String}

Okay (except for the name of the hash).

                                        Juliusz




More information about the darcs-devel mailing list