X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/b4bee06a2de5d74f9b1de64ffbb464e235a3194a..62896f1b8dcf9a04f94c44170063ef274326fa4c:/vcsh diff --git a/vcsh b/vcsh index 5d5628e..a6d8213 100755 --- a/vcsh +++ b/vcsh @@ -152,15 +152,17 @@ clone() { exit fi git fetch - for object in $(git ls-tree -r origin/master | awk '{print $4}'); do + hook pre-merge + git ls-tree -r --name-only origin/master | (while read object; do [ -e "$object" ] && error "'$object' exists." && VCSH_CONFLICT=1 done - [ "$VCSH_CONFLICT" = '1' ] && + [ "$VCSH_CONFLICT" = '1' ]) && fatal "will stop after fetching and not try to merge! Once this situation has been resolved, run 'vcsh run $VCSH_REPO_NAME git pull' to finish cloning." 17 git merge origin/master + hook post-merge hook post-clone retire hook post-clone-retired