{"thread":{"id":"55300","subject":"[BUG] Error adding 2+ files after init --shared on Windows with fscache","startedAt":"2021-03-12T15:53:38Z","lastAt":"2021-03-12T22:14:29Z","messageCount":3,"participants":["Steven Kelly","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"418973","messageId":"AM7P194MB0900C227791B8B7AA1D34DBEA66F9@AM7P194MB0900.EURP194.PROD.OUTLOOK.COM","threadId":"55300","inReplyTo":null,"subject":"[BUG] Error adding 2+ files after init --shared on Windows with fscache","fromName":"Steven Kelly","fromEmail":"stevek@metacase.com","sentAt":"2021-03-12T15:52:43Z","receivedAt":"2021-03-12T15:53:38Z","isPatch":false,"sender":{"key":"stevek@metacase.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\nClean install of Git on Windows 10 using default options\ngit init --shared\necho x>x\necho y>y\ngit add -A\n\nWhat did you expect to happen? (Expected behavior)\nThe two files are added with no errors\n\nWhat happened instead? (Actual behavior)\nerror: unable to create temporary file: No such file or directory\nerror: y: failed to insert into database\nerror: unable to index file 'y'\nfatal: adding files failed\n\nWhat's different between what you expected and what actually happened?\nThe add command fails with an error 'unable to create temporary file'\n\nAnything else you want to add:\nIf I omit --shared, there is no error\nIf there is only one file, there is no error\nIf the echo commands do not have characters, just adding a blank line, there is no error\nIf I turn off fscache, there is no error (git config --global core.fscache false)\nAll other filenames and contents also show the problem, for 2+ files\nE.g. with files x,y,z,a,b, error happens on b - seems to be 2nd file in alphabetical order\nThe various GIT_TRACE_* options do not reveal anything useful, just normal setup up to trace: built-in: git add -A\nProblem has existed for over a year (Google the 'unable to create...or directory' error and git)\nConfirmed in git version 2.26.2.windows.1\n\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.30.2.windows.1\ncpu: x86_64\nbuilt from commit: 37f0a4afad027cf030747a1ef45537ba86162960\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Windows 10.0 19041 \ncompiler info: gnuc: 10.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): <unset>\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n"},{"id":"419000","messageId":"YEvZnm1z7nm6ctHA@camp.crustytoothpaste.net","threadId":"55300","inReplyTo":"AM7P194MB0900C227791B8B7AA1D34DBEA66F9@AM7P194MB0900.EURP194.PROD.OUTLOOK.COM","subject":"Re: [BUG] Error adding 2+ files after init --shared on Windows with fscache","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2021-03-12T21:14:06Z","receivedAt":"2021-03-12T21:15:10Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2021-03-12 at 15:52:43, Steven Kelly wrote:\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> Clean install of Git on Windows 10 using default options\n> git init --shared\n> echo x>x\n> echo y>y\n> git add -A\n> \n> What did you expect to happen? (Expected behavior)\n> The two files are added with no errors\n> \n> What happened instead? (Actual behavior)\n> error: unable to create temporary file: No such file or directory\n> error: y: failed to insert into database\n> error: unable to index file 'y'\n> fatal: adding files failed\n> \n> What's different between what you expected and what actually happened?\n> The add command fails with an error 'unable to create temporary file'\n> \n> Anything else you want to add:\n> If I omit --shared, there is no error\n> If there is only one file, there is no error\n> If the echo commands do not have characters, just adding a blank line, there is no error\n> If I turn off fscache, there is no error (git config --global core.fscache false)\n\nSeeing this definitely makes me think this should be reported to the Git\nfor Windows project (https://github.com/git-for-windows/git) because\nthat's a nonstandard option that's specific to Windows.  I don't think\nanyone here (other, of course, than the Git for Windows folks) is\nfamiliar with how that option works and since it isn't part of core Git\nwe wouldn't be able to fix it.\n-- \nbrian m. carlson (he/him or they/them)\nHouston, Texas, US\n"},{"id":"419004","messageId":"AM7P194MB0900EF9C0B19A1382652A669A66F9@AM7P194MB0900.EURP194.PROD.OUTLOOK.COM","threadId":"55300","inReplyTo":"YEvZnm1z7nm6ctHA@camp.crustytoothpaste.net","subject":"RE: [BUG] Error adding 2+ files after init --shared on Windows with fscache","fromName":"Steven Kelly","fromEmail":"stevek@metacase.com","sentAt":"2021-03-12T22:13:49Z","receivedAt":"2021-03-12T22:14:29Z","isPatch":false,"sender":{"key":"stevek@metacase.com","avatar":null},"body":"On 2021-03-12 at 21:14:00, brian m.carlson wrote:\n> On 2021-03-12 at 15:52:43, Steven Kelly wrote:\n> > What did you do before the bug happened? (Steps to reproduce your\n> issue)\n> > Clean install of Git on Windows 10 using default options\n> > git init --shared\n> > echo x>x\n> > echo y>y\n> > git add -A\n> >\n> > What did you expect to happen? (Expected behavior)\n> > The two files are added with no errors\n> >\n> > What happened instead? (Actual behavior)\n> > error: unable to create temporary file: No such file or directory\n> > error: y: failed to insert into database\n> > error: unable to index file 'y'\n> > fatal: adding files failed\n> >\n> > What's different between what you expected and what actually\n> happened?\n> > The add command fails with an error 'unable to create temporary file'\n> >\n> > Anything else you want to add:\n> > If I omit --shared, there is no error\n> > If there is only one file, there is no error\n> > If the echo commands do not have characters, just adding a blank line,\n> there is no error\n> > If I turn off fscache, there is no error (git config --global core.fscache false)\n> \n> Seeing this definitely makes me think this should be reported to the Git\n> for Windows project (https://github.com/git-for-windows/git) because\n> that's a nonstandard option that's specific to Windows.  I don't think\n> anyone here (other, of course, than the Git for Windows folks) is\n> familiar with how that option works and since it isn't part of core Git\n> we wouldn't be able to fix it.\n\nThanks, duly reported: https://github.com/git-for-windows/git/issues/3110#issue-830551915\nI note this bug does not occur in git version 2.9.3.windows.2 (2016) on Windows 10.0.18363.1316 with fscache\nIt seems to have existed since at least 2017: https://stackoverflow.com/a/44040893\n"}]}