Skip to content
Snippets Groups Projects
Commit b40cd1a7 authored by Richard Hartmann's avatar Richard Hartmann
Browse files

vcsh: Handle Git older than 2.x

We will fetch more data than needed with Git 1.8, but other than that...
parent cf9bd27d
No related branches found
No related tags found
No related merge requests found
...@@ -159,7 +159,12 @@ clone() { ...@@ -159,7 +159,12 @@ clone() {
You should add files to your new repository." You should add files to your new repository."
exit exit
fi fi
GIT_VERSION_MAJOR=$(git --version | sed -n 's/.* \([0-9]\)\..*/\1/p' )
if [ 2 -ge "$GIT_VERSION_MAJOR" ];then
git fetch origin "$VCSH_BRANCH" git fetch origin "$VCSH_BRANCH"
else
git fetch origin
fi
hook pre-merge hook pre-merge
git ls-tree -r --name-only origin/"$VCSH_BRANCH" | (while read object; do git ls-tree -r --name-only origin/"$VCSH_BRANCH" | (while read object; do
[ -e "$object" ] && [ -e "$object" ] &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment