X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/cf9bd27d5bcbecf461b55acd76dbf57679e4a6b3..2c13ac4b6501fac484aef891a92a7e736401ebe9:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index c30b12d..98dd71e 100755 --- a/vcsh +++ b/vcsh @@ -159,7 +159,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" ] &&