git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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/
Next: Duy Nguyen
Message 1 of 3 in “[BUG] git mv file directory/ creates the file directory”
  1. Matthieu MoyDec 2, 2013
  2. Duy NguyenDec 2, 2013
  3. Matthieu MoyDec 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.