[darcs-users] optimize --relink with symbolic links?

Michael Price ectospheno at gmail.com
Mon Nov 21 20:55:20 UTC 2005


On 11/21/05, Juliusz Chroboczek <Juliusz.Chroboczek at pps.jussieu.fr> wrote:
> Under some circumstances, Darcs will change the contents of a file
> without changing its name.  With hard links, the link will be broken
> in this case, which is The Right Thing; with soft links, there's no
> way to achieve this effect.

Err, I thought the only way to "break a link" was to call unlink() or
something which eventually calls unlink().

$ ~/tmp> echo hi > a
$ ~/tmp> ln a b
$ ~/tmp> cat b
hi
$ ~/tmp> echo bye > b
$ ~/tmp> cat a
bye

So darcs pretty much has to be unlinking the file and creating a new
one with the same name. How does that break with symbolic links?

Michael


More information about the darcs-users mailing list