use clone --single-branch

Sun, 09 Jan 2022 15:04:17 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 09 Jan 2022 15:04:17 -0500
changeset 966
e1132c1cce12
parent 965
f1e5d30543ba
child 967
9314317ed18f

use clone --single-branch

bin/homedir-setup file | annotate | diff | comparison | revisions
--- a/bin/homedir-setup
+++ b/bin/homedir-setup
@@ -13,10 +13,10 @@ fi
 
 clone_or_pull() {
   if ! [ -d $2 ]; then
-    git clone --depth 1 "$1" $2
+    git clone --single-branch --depth 1 "$1" $2
   else
     echo "$2:"
-    git -C "$2" pull --no-tags
+    git -C "$2" pull
   fi
 }
 

mercurial