[BUG] git mv file directory/ creates the file directory
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Dec 2, 2013, 10:04 UTC
- Message-ID
- <vpqli03sh61.fsf@anie.imag.fr>
Hi,
When directory/ does not exist, I'd expect this to fail:
git mv existing-file directory/
(note the trailing slash, to make it clear that directory/ is a directory). Unix's mv does fail:
$ mv existing-file directory/ mv: cannot move `existing-file' to `directory/': Not a directory
Instead, "git mv" seems to do the equivalent of
git mv existing-file directory # without trailing slash
-- Matthieu Moy http://www-verimag.imag.fr/~moy/