From 3369508fa9487997863d003bfc4e912bc76d86be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 14 Mar 2011 22:00:20 +0000 Subject: [PATCH] nix-prefetch-git: Add rudimentary TopGit support. svn path=/nixpkgs/trunk/; revision=26305 --- pkgs/build-support/fetchgit/nix-prefetch-git | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index 63d756c5807c..198ab5c65fed 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -120,6 +120,17 @@ clone(){ # Checkout linked sources. init_submodules; + if [ -f .topdeps ]; then + if tg help 2>&1 > /dev/null + then + echo "populating TopGit branches..." + tg remote --populate origin + else + echo "WARNING: would populate TopGit branches but TopGit is not available" >&2 + echo "WARNING: install TopGit to fix the problem" >&2 + fi + fi + cd $top; }