X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/cf9bd27d5bcbecf461b55acd76dbf57679e4a6b3..b40cd1a7fe1c45bd1f7f7f80802b157a41f97dfe:/vcsh?ds=inline diff --git a/vcsh b/vcsh index c30b12d..d77f7cc 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 [ 2 -ge "$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" ] &&