X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/30e3b0e741f20d73e24978b4722dd58e7b3ef741..9d67671f8cdb7786fe833c665e016d02dbe3ce31:/doc/sample_hooks/pre-merge-unclobber?ds=sidebyside diff --git a/doc/sample_hooks/pre-merge-unclobber b/doc/sample_hooks/pre-merge-unclobber index 93a7319..5261096 100755 --- a/doc/sample_hooks/pre-merge-unclobber +++ b/doc/sample_hooks/pre-merge-unclobber @@ -1,10 +1,10 @@ #!/bin/sh -# This code does amost exactly what the native VCSH sanity checking code -# does except that on finding a potential merge conflict, it moves the -# extant object out of the way temporarily. The merge then happens cleanly -# as far as git knows, and a post-merge hook can figure out what to do with -# the extant versions of the objects. +# This code does amost exactly what the native vcsh sanity checking code +# does except that on finding a potential merge conflict, it moves existing +# files out of the way temporarily. Merging (part of `vcsh clone`) happens +# cleanly, and a post-merge hook can be used to figure out what to do with +# the now-renamed files. for object in $(git ls-tree -r origin/master | awk '{print $4}'); do [ -e "$object" ] && mv "$object" "$object.vcsh-unclobber"