[darcs-devel] [patch2192] use paths from D.R.Paths in D.R.Packs (and 2 more)
bugs at darcs.net
Sat Jun 5 16:09:55 UTC 2021
Ben Franksen <ben.franksen at online.de> added the comment:
>>> use paths from D.R.Paths in D.R.Packs
>>> This also removes an obsolete debugMessage and then inlines
>> Does this inlining drop the test for whether the file already
>> exists? I tried digging through fetchFilesUsingCachePrivate but
>> couldn't spot any existing check for that, though it might
>> be buried in the "cache" mechanism.
> The latter. Without going into too much detail, fetchFileUsingCache does
> its best to avoid unnecessary work; in particular, before copying or
> downloading anything, it first searches for the file in all writable
> locations, which always includes the "current" repo. Which means that
> the test that was done here is redundant.
Indeed it may be harmful, since it suppresses one of the side-effects of
fetchFileUsingCache, which is that the file gets hard-linked across all
writable locations (if possible), i.e. usually between the current repo
and the per-user cache. Which means that subsequence clones may not be
able to make full use of the cache.
Darcs bug tracker <bugs at darcs.net>
More information about the darcs-devel