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

[BUG] git-mv fails with "source directory is empty" when it should not

From
Sergey Vlasov <vsu@altlinux.ru>
Date
Dec 3, 2006, 13:57 UTC
Message-ID
<20061203135725.GA7971@procyon.home>
Hello!

In some cases git-mv fails with "source directory is empty" when this is definitely not the case.

Example (run in an empty directory):

$ git init-db defaulting to local storage area $ mkdir ab; touch ab.c; touch ab/d $ git add . $ git commit -m 'initial' Committing initial tree f2dd231ec22a1d4376d4a6eadf49d87dd34ac2a0 $ git mv ab a fatal: source directory is empty, source=ab, destination=a

However, at this point the source directory is definitely not empty:

$ git ls-tree -r HEAD 100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 ab.c 100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 ab/d $ ls -ogR .: total 4 drwxr-xr-x 2 4096 Dec 3 16:47 ab -rw-r--r-- 1 0 Dec 3 16:47 ab.c

./ab: total 0 -rw-r--r-- 1 0 Dec 3 16:47 d $ git status nothing to commit

This happens both in v1.4.4.1 and in current 'master' (v1.4.4.1-g278fcd7).
-- 
Sergey Vlasov
Next: Johannes Schindelin
Message 1 of 3 in “[BUG] git-mv fails with "source directory is empty" when it should not”
  1. Sergey VlasovDec 3, 2006
  2. git-mv: search more precisely for source directory in indexJohannes Schindelin, Dec 3, 2006
  3. Sergey VlasovDec 3, 2006

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.