X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/0554f58886a62ee654998cc656d923fe86246cd7..2c13ac4b6501fac484aef891a92a7e736401ebe9:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index e339cde..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" ] && @@ -169,7 +174,7 @@ clone() { [ x"$VCSH_CONFLICT" = x'1' ]) && fatal "will stop after fetching and not try to merge! Once this situation has been resolved, run 'vcsh $VCSH_REPO_NAME pull' to finish cloning." 17 - git merge origin/"$VCSH_BRANCH" + git -c merge.ff=true merge origin/"$VCSH_BRANCH" hook post-merge hook post-clone retire @@ -264,7 +269,7 @@ list_tracked_helper() { } list_tracked_by() { - list_tracked $2 + list_tracked '' $2 } list_untracked() {