bash: remove fetch, push, pull dashed form leftovers
[gitweb.git] / git-merge-one-file.sh
index 9ee3f804520eadb322de3d0ea70a2bf9f092b089..e1eb9632660146396a0b5f3f2a410d8cb027ff9d 100755 (executable)
@@ -48,10 +48,11 @@ case "${1:-.}${2:-.}${3:-.}" in
        ;;
 "..$3")
        echo "Adding $4"
-       test -f "$4" || {
+       if test -f "$4"
+       then
                echo "ERROR: untracked $4 is overwritten by the merge."
                exit 1
-       }
+       fi
        git update-index --add --cacheinfo "$7" "$3" "$4" &&
                exec git checkout-index -u -f -- "$4"
        ;;