X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/84136a71144ce51245c739089e8f30871b1de8b7..cd83d7718b378f58bff84c9d32e8dc71f585f360:/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" ] &&