On 31 December 2014 at 17:50, Rico Huijbers <[email protected]> wrote:
> Hi,
>
> When I copy/paste a fetchgit block from another file, and change the URL and 
> rev without changing the hash, I expect the download to fail (and tell me the 
> hash).
>
> However, what actually happens is that fetchgit just looks at the hash, sees 
> that *something* with that hash has already been downloaded, and happily 
> proceeds with the rest of the script using the wrong source files. Now I have 
> to go and do nix-prefetch-git every time.
>
> Shouldn’t fetchgit build the hash from URL and rev, as opposed to the 
> provided hash? Or am I doing it wrong?

AFAIK, it's the nixos hashed mirror that creates this behaviour.
fetchgit itself will re-download if the _basename_ of the URL changes,
but when the hashed mirror has a file with the given hash, it is
downloaded instead.

So it's the hashed mirror that needs to take the basename of URL into account.

Best regards,
Bjørn Forsman
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to