Skip to content
Snippets Groups Projects
Commit 49a6af92 authored by Caleb Maclennan's avatar Caleb Maclennan
Browse files

add hooks to enable auto handing of merge conflicts

These hooks before and after the actual checkout process
will enable a pair of hook scripts to automatically handle
conflicts and potentially allow the checkout of repositories
over existing file sets
parent 890dbded
Branches
Tags
No related merge requests found
......@@ -14,6 +14,12 @@ Available hooks are:
* post-enter
* pre-init
* post-init
* pre-merge
Use this hook to detect and handle merge conflicts before vcsh's native code
finds and errors on them. This is useful for allowing clones on top of existing
files.
* post-merge
Use this hook to finish handling any merge conflicts found in the pre-merge hook.
* pre-pull
* post-pull
* pre-push
......
......
......@@ -152,6 +152,7 @@ clone() {
exit
fi
git fetch
hook pre-merge
git ls-tree -r --name-only origin/master | (while read object; do
[ -e "$object" ] &&
error "'$object' exists." &&
......@@ -161,6 +162,7 @@ clone() {
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
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment