--8<---------------cut here---------------start------------->8---
Subject: [PATCH] cygclass/git.cygclass: use shallow clones for branches and 
tags also

---
 cygclass/git.cygclass | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/cygclass/git.cygclass b/cygclass/git.cygclass
index 1e3de23..f63cc5f 100644
--- a/cygclass/git.cygclass
+++ b/cygclass/git.cygclass
@@ -70,10 +70,17 @@ git_fetch() {
 
        check_prog_req git
 
-       if ! defined GIT_TAG && ! defined GIT_BRANCH && ! defined GIT_REV
+       if ! defined GIT_REV
        then
-               # fetching master/HEAD, so we don't need any history
+               # fetching master/HEAD, branch or tag, so we don't need any 
history
                _depth="--depth 1"
+               if defined GIT_TAG
+               then
+                       _depth+=" --branch ${GIT_TAG}"
+               elif defined GIT_BRANCH
+               then
+                       _depth+=" --branch ${GIT_BRANCH}"
+               fi
        fi
 
        # T likely doesn't exist at this point, so create it first
-- 
2.29.2

--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

Reply via email to