X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/30e3b0e741f20d73e24978b4722dd58e7b3ef741..505846e878ec69d4b2880070dc98d88df339b9a3:/doc/sample_hooks/pre-merge-unclobber?ds=inline 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"