grep: correctly initialize help-all option
[gitweb.git] / builtin / mv.c
index 2a7243f52e413c821f9f75969edcc0a9822c8e21..180ef99127d47d0e8fe9f12a590fd9ba9e524f08 100644 (file)
@@ -203,7 +203,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
                        }
                } else if (cache_name_pos(src, length) < 0)
                        bad = _("not under version control");
-               else if (lstat(dst, &st) == 0) {
+               else if (lstat(dst, &st) == 0 &&
+                        (!ignore_case || strcasecmp(src, dst))) {
                        bad = _("destination exists");
                        if (force) {
                                /*