Home > Back-end >  Git - BUG: refs/files-backend.c:465: returning non-zero -1, should have set myerr! On branch main
Git - BUG: refs/files-backend.c:465: returning non-zero -1, should have set myerr! On branch main

Time:02-02

I have copy-pasted some files into my directory where I have git, and when I ran a command git status it gave me this error message.

BUG: refs/files-backend.c:465: returning non-zero -1, should have set myerr!
On branch main

When I restored everything with git restore ., the message still remains.

I have tried to find the meaning of the bug, but I haven’t found anything.

CodePudding user response:

The release 2.35.1(2) seems to fix this issue, through PR 3678

Context: issue 3655 and issue 3674 (the last one is mentioned in the comments).

A bug in FSCache

See commit 5437f0f

In fscache_lstat(), we did not set errno upon a cache miss (which indicates that the item did not exist at the time the lstat() values were cached), and therefore we now trigger this problem all the time.

Let's set errno=ENOENT when no entry was found.

  •  Tags:  
  • Related