+visible_repo_name()
+{
+ case "$1" in
+ .)
+ echo "the root directory"
+ ;;
+ *)
+ echo "\"$1\""
+ ;;
+ esac
+}
+
+check_mergeconflict()
+{
+ if git ls-files -u | grep ' 1 '; then
+ echo
+ echo "MERGE CONFLICT."
+ echo "change into the \"$1\" project directory, and then:"
+ echo "- edit the files mentioned above with your favorite editor,"
+ echo " and fix the conflicts (marked with <<<<<<< blocks)"
+ echo "- for binary files, you can select the files using"
+ echo " git checkout --ours or git checkout --theirs"
+ echo "- when done with a file, 'git add' the file"
+ echo "- when done, 'git commit'"
+ echo
+ exit 1
+ fi
+}
+
+enter()
+{
+ verbose cd "$1"
+ check_mergeconflict "$1"
+}
+