X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/4dde85340f627e187dad582610e881314404ab53..6e5118a290be0dc24b919e8dc249aa9d763cd8b6:/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" ] &&