Browse Source

clone git deps with depth=1 to improve speed

rilian 10 years ago
parent
commit
ca903bd7ec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mad_deps.erl

+ 2 - 2
src/mad_deps.erl

@@ -40,9 +40,9 @@ fetch_dep(Cwd, Config, ConfigFile, Name, Cmd, Uri, Co, Cache) ->
 
     {R,Co1} = case Co of
         {_,Rev} ->
-            {["git clone ",Uri," ",TrunkPath," && cd ",TrunkPath,
+            {["git clone --depth=1 ",Uri," ",TrunkPath," && cd ",TrunkPath,
              " && git checkout \"",Rev,"\"" ],Rev};
-        Master -> {["git clone ", Uri," ", TrunkPath ],lists:concat([Master])} end,
+        Master -> {["git clone --depth=1 ",Uri," ",TrunkPath],lists:concat([Master])} end,
 
     os:cmd(R),