diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:48:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:48:34 -0700 |
| commit | 5fa38cc3a47c197a352dc52a1b373162c84b8697 (patch) | |
| tree | 9e6fabd7e859f6c1d211cbd5050c1505cb340405 /builtin | |
| parent | Merge branch 'rs/mailinfo-header-cmp' into maint (diff) | |
| parent | mv: allow renaming to fix case on case insensitive filesystems (diff) | |
| download | git-5fa38cc3a47c197a352dc52a1b373162c84b8697.tar.gz git-5fa38cc3a47c197a352dc52a1b373162c84b8697.zip | |
Merge branch 'dt/merge-recursive-case-insensitive' into maint
On a case insensitive filesystem, merge-recursive incorrectly
deleted the file that is to be renamed to a name that is the same
except for case differences.
* dt/merge-recursive-case-insensitive:
mv: allow renaming to fix case on case insensitive filesystems
merge-recursive.c: fix case-changing merge bug
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/mv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/mv.c b/builtin/mv.c index 2a7243f52e..180ef99127 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -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) { /* |
