{"thread":{"id":"41149","subject":"[BUG] git add . after removing .git/ in a subdirectory triggers assertion failure","startedAt":"2016-01-08T11:33:06Z","lastAt":"2016-01-08T12:10:08Z","messageCount":2,"participants":["Matthieu Moy","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"275542","messageId":"vpqvb74fgr1.fsf@anie.imag.fr","threadId":"41149","inReplyTo":null,"subject":"[BUG] git add . after removing .git/ in a subdirectory triggers assertion failure","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2016-01-08T11:33:06Z","receivedAt":"2016-01-08T11:33:06Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Hi,\n\nNo time to debug this for now, but I have a reproduction script:\n\nmkdir test && cd test\ngit init sub   \ncd sub/\ntouch foo && git add . && git commit -m\"foo\"\ncd ..\ngit init\ngit add sub \nrm -fr sub/.git/\ncd sub/\ngit add .\n\nIn short, sub used to be a submodule, but we removed the .git/ and tried\nto \"git add .\" the result.\n\nThe last line triggers this:\n\ngit: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.\n\nCheers,\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"275544","messageId":"CACsJy8C+7PpsOxY=_WXNdzAvrZ=KKsHc1G=2DdmNO1_D8fbhig@mail.gmail.com","threadId":"41149","inReplyTo":"vpqvb74fgr1.fsf@anie.imag.fr","subject":"Re: [BUG] git add . after removing .git/ in a subdirectory triggers assertion failure","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-01-08T12:10:08Z","receivedAt":"2016-01-08T12:10:08Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Jan 8, 2016 at 6:33 PM, Matthieu Moy\n<Matthieu.Moy@grenoble-inp.fr> wrote:\n> Hi,\n>\n> No time to debug this for now, but I have a reproduction script:\n>\n> mkdir test && cd test\n> git init sub\n> cd sub/\n> touch foo && git add . && git commit -m\"foo\"\n> cd ..\n> git init\n> git add sub\n> rm -fr sub/.git/\n> cd sub/\n> git add .\n>\n> In short, sub used to be a submodule, but we removed the .git/ and tried\n> to \"git add .\" the result.\n>\n> The last line triggers this:\n>\n> git: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.\n\nReported twice in the past and I failed to provide a proper fix:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/267095/focus=267404\n-- \nDuy\n"}]}