git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG] Error adding 2+ files after init --shared on Windows with fscache
@ 2021-03-12 15:52 Steven Kelly
  2021-03-12 21:14 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Kelly @ 2021-03-12 15:52 UTC (permalink / raw)
  To: 'git@vger.kernel.org'

What did you do before the bug happened? (Steps to reproduce your issue)
Clean install of Git on Windows 10 using default options
git init --shared
echo x>x
echo y>y
git add -A

What did you expect to happen? (Expected behavior)
The two files are added with no errors

What happened instead? (Actual behavior)
error: unable to create temporary file: No such file or directory
error: y: failed to insert into database
error: unable to index file 'y'
fatal: adding files failed

What's different between what you expected and what actually happened?
The add command fails with an error 'unable to create temporary file'

Anything else you want to add:
If I omit --shared, there is no error
If there is only one file, there is no error
If the echo commands do not have characters, just adding a blank line, there is no error
If I turn off fscache, there is no error (git config --global core.fscache false)
All other filenames and contents also show the problem, for 2+ files
E.g. with files x,y,z,a,b, error happens on b - seems to be 2nd file in alphabetical order
The various GIT_TRACE_* options do not reveal anything useful, just normal setup up to trace: built-in: git add -A
Problem has existed for over a year (Google the 'unable to create...or directory' error and git)
Confirmed in git version 2.26.2.windows.1


Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.30.2.windows.1
cpu: x86_64
built from commit: 37f0a4afad027cf030747a1ef45537ba86162960
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 10.0 19041 
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]
not run from a git repository - no hooks to show

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] Error adding 2+ files after init --shared on Windows with fscache
  2021-03-12 15:52 [BUG] Error adding 2+ files after init --shared on Windows with fscache Steven Kelly
@ 2021-03-12 21:14 ` brian m. carlson
  2021-03-12 22:13   ` Steven Kelly
  0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2021-03-12 21:14 UTC (permalink / raw)
  To: Steven Kelly; +Cc: 'git@vger.kernel.org'

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

On 2021-03-12 at 15:52:43, Steven Kelly wrote:
> What did you do before the bug happened? (Steps to reproduce your issue)
> Clean install of Git on Windows 10 using default options
> git init --shared
> echo x>x
> echo y>y
> git add -A
> 
> What did you expect to happen? (Expected behavior)
> The two files are added with no errors
> 
> What happened instead? (Actual behavior)
> error: unable to create temporary file: No such file or directory
> error: y: failed to insert into database
> error: unable to index file 'y'
> fatal: adding files failed
> 
> What's different between what you expected and what actually happened?
> The add command fails with an error 'unable to create temporary file'
> 
> Anything else you want to add:
> If I omit --shared, there is no error
> If there is only one file, there is no error
> If the echo commands do not have characters, just adding a blank line, there is no error
> If I turn off fscache, there is no error (git config --global core.fscache false)

Seeing this definitely makes me think this should be reported to the Git
for Windows project (https://github.com/git-for-windows/git) because
that's a nonstandard option that's specific to Windows.  I don't think
anyone here (other, of course, than the Git for Windows folks) is
familiar with how that option works and since it isn't part of core Git
we wouldn't be able to fix it.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [BUG] Error adding 2+ files after init --shared on Windows with fscache
  2021-03-12 21:14 ` brian m. carlson
@ 2021-03-12 22:13   ` Steven Kelly
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Kelly @ 2021-03-12 22:13 UTC (permalink / raw)
  To: 'brian m. carlson'; +Cc: 'git@vger.kernel.org'

On 2021-03-12 at 21:14:00, brian m.carlson wrote:
> On 2021-03-12 at 15:52:43, Steven Kelly wrote:
> > What did you do before the bug happened? (Steps to reproduce your
> issue)
> > Clean install of Git on Windows 10 using default options
> > git init --shared
> > echo x>x
> > echo y>y
> > git add -A
> >
> > What did you expect to happen? (Expected behavior)
> > The two files are added with no errors
> >
> > What happened instead? (Actual behavior)
> > error: unable to create temporary file: No such file or directory
> > error: y: failed to insert into database
> > error: unable to index file 'y'
> > fatal: adding files failed
> >
> > What's different between what you expected and what actually
> happened?
> > The add command fails with an error 'unable to create temporary file'
> >
> > Anything else you want to add:
> > If I omit --shared, there is no error
> > If there is only one file, there is no error
> > If the echo commands do not have characters, just adding a blank line,
> there is no error
> > If I turn off fscache, there is no error (git config --global core.fscache false)
> 
> Seeing this definitely makes me think this should be reported to the Git
> for Windows project (https://github.com/git-for-windows/git) because
> that's a nonstandard option that's specific to Windows.  I don't think
> anyone here (other, of course, than the Git for Windows folks) is
> familiar with how that option works and since it isn't part of core Git
> we wouldn't be able to fix it.

Thanks, duly reported: https://github.com/git-for-windows/git/issues/3110#issue-830551915
I note this bug does not occur in git version 2.9.3.windows.2 (2016) on Windows 10.0.18363.1316 with fscache
It seems to have existed since at least 2017: https://stackoverflow.com/a/44040893

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-12 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 15:52 [BUG] Error adding 2+ files after init --shared on Windows with fscache Steven Kelly
2021-03-12 21:14 ` brian m. carlson
2021-03-12 22:13   ` Steven Kelly

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).