[Nix-dev] Re: Use shallow copying in fetchgit
Nicolas Pierron
nicolas.b.pierron at gmail.com
Thu Jul 21 11:24:30 CEST 2011
On Thu, Jul 21, 2011 at 01:26, Marc Weber <marco-oweber at gmx.de> wrote:
> Excerpts from Peter Simons's message of Thu Jul 21 01:14:23 +0200 2011:
> That's the code
> pkgs/build-support/fetchgit/nix-prefetch-git
>
> Its doing this:
>
> git fetch --depth 1 origin +"$ref" || return 1
>
> Didn't know that you can fetch hash's that way.
> You can git fetch --depth 100 then try 200 then 500 .. to find it as
> well. If Pierron's solution works its best.
Last time I tried, it was only working with references such as
refs/tags/3.14 but not with hashes. The machinery inside
nix-prefect-git ask the remote repository for its references in the
hope to get a reference out of the requested hash.
Your solution could to be tried because nix-prefect-git is fetching
the full repository when it does not find any references corresponding
to the hash.
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
More information about the nix-dev
mailing list