X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/2cc7ffcd61352b55d7c010c7524a739b3fe13c80..6622c3b35cda7d1d94d25ba53b7895ab621b5210:/vcsh diff --git a/vcsh b/vcsh index 06f6c33..98e0acd 100755 --- a/vcsh +++ b/vcsh @@ -162,7 +162,12 @@ clone() { You should add files to your new repository." exit fi - git fetch origin "$VCSH_BRANCH" + GIT_VERSION_MAJOR=$(git --version | sed -n 's/.* \([0-9]\)\..*/\1/p' ) + if [ 1 -lt "$GIT_VERSION_MAJOR" ];then + git fetch origin "$VCSH_BRANCH" + else + git fetch origin + fi hook pre-merge git ls-tree -r --name-only origin/"$VCSH_BRANCH" | (while read object; do [ -e "$object" ] &&