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

[BUG] git add . after removing .git/ in a subdirectory triggers assertion failure

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jan 8, 2016, 11:33 UTC
Message-ID
<vpqvb74fgr1.fsf@anie.imag.fr>
Hi,
No time to debug this for now, but I have a reproduction script:

mkdir test && cd test git init sub cd sub/ touch foo && git add . && git commit -m"foo" cd .. git init git add sub rm -fr sub/.git/ cd sub/ git add .

In short, sub used to be a submodule, but we removed the .git/ and tried to "git add ." the result.

The last line triggers this:
git: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.
Cheers,
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Next: Duy Nguyen
Message 1 of 2 in “[BUG] git add . after removing .git/ in a subdirectory triggers assertion failure”
  1. Matthieu MoyJan 8, 2016
  2. Duy NguyenJan 8, 2016

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.