{"thread":{"id":"60382","subject":"Git Pathspec bug","startedAt":"2023-10-17T09:47:17Z","lastAt":"2023-10-17T16:02:08Z","messageCount":3,"participants":["Moritz Widmann","Kristoffer Haugsbakk","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"483338","messageId":"7368e4ad-b05b-4b8f-a13b-0a68b442e72b@tweaklab.org","threadId":"60382","inReplyTo":null,"subject":"Git Pathspec bug","fromName":"Moritz Widmann","fromEmail":"widmann@tweaklab.org","sentAt":"2023-10-17T09:45:48Z","receivedAt":"2023-10-17T09:47:17Z","isPatch":false,"sender":{"key":"widmann@tweaklab.org","avatar":null},"body":"I executed the following command in zsh (added `command` just to be sure \nthat there's no aliases or functions)\n\ncommand git submodule add \n'git@github.com:moritz-t-w/Godot-Onscreen-Keyboard.git' '.'\nfatal: empty string is not a valid pathspec. please use . instead if you \nmeant to match all paths\n\nGit Version: 2.42.0\n\nOS: Arch Linux\n\n"},{"id":"483339","messageId":"2c45e813-738a-480f-8c77-8c646df9c0e3@app.fastmail.com","threadId":"60382","inReplyTo":"7368e4ad-b05b-4b8f-a13b-0a68b442e72b@tweaklab.org","subject":"Re: Git Pathspec bug","fromName":"Kristoffer Haugsbakk","fromEmail":"code@khaugsbakk.name","sentAt":"2023-10-17T10:51:00Z","receivedAt":"2023-10-17T10:51:26Z","isPatch":false,"sender":{"key":"code@khaugsbakk.name","avatar":"https://avatars.githubusercontent.com/u/2229597?v=4"},"body":"On Tue, Oct 17, 2023, at 11:45, Moritz Widmann wrote:\n> I executed the following command in zsh (added `command` just to be sure \n> that there's no aliases or functions)\n>\n> command git submodule add \n> 'git@github.com:moritz-t-w/Godot-Onscreen-Keyboard.git' '.'\n> fatal: empty string is not a valid pathspec. please use . instead if you \n> meant to match all paths\n>\n> Git Version: 2.42.0\n>\n> OS: Arch Linux\n\nIs this the same issue?: https://stackoverflow.com/a/53441183/1725151\n"},{"id":"483343","messageId":"xmqqwmvljkzr.fsf@gitster.g","threadId":"60382","inReplyTo":"2c45e813-738a-480f-8c77-8c646df9c0e3@app.fastmail.com","subject":"Re: Git Pathspec bug","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-10-17T16:02:00Z","receivedAt":"2023-10-17T16:02:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kristoffer Haugsbakk\" <code@khaugsbakk.name> writes:\n\n> On Tue, Oct 17, 2023, at 11:45, Moritz Widmann wrote:\n>> I executed the following command in zsh (added `command` just to be sure \n>> that there's no aliases or functions)\n>>\n>> command git submodule add \n>> 'git@github.com:moritz-t-w/Godot-Onscreen-Keyboard.git' '.'\n>> fatal: empty string is not a valid pathspec. please use . instead if you \n>> meant to match all paths\n>>\n>> Git Version: 2.42.0\n>>\n>> OS: Arch Linux\n>\n> Is this the same issue?: https://stackoverflow.com/a/53441183/1725151\n\nIt does look so.\n\nIt is correct to reject such a request to attempt to add a submodule\nas if it is overlayed at the same level as its superproject [*].\nBut the error message is totally bogus, I think.  It is not that the\npathspec the end-user gave us is wrong (the user does not even give\na pathspec in this case---the last one must be a concrete path in\nthe superproject where the newly added submodule is), and the user\nshould not be told anything about \"valid\" pathspec.\n\nPatches welcome ;-)\n\nThanks.\n\n[Footnote]\n\n* Our submodules do not allow such a layout (and \"git add foo\" in\n  such an environment would not know to which repository between the\n  submodule or the superproject that new file \"foo\" should be added,\n  which is just one example why such a layout is not usable).\n"}]}