Re: git fsck complains about error: refs/tags/.cyg000000000559e25517156b51cf219f51/libgcj-2.95.0: badRefName: invalid refname format?!

Dan Shelton via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <CAAvCNcASN+pduqG1LT6S1nZhd02-7vFdj5WNNpgkDbrMgV2ZxQ@mail.gmail.com>
On Mon, 2 Feb 2026 at 14:40, Corinna Vinschen via Cygwin
<[email protected]> wrote:
>
> On Feb  2 13:24, Dan Shelton via Cygwin wrote:
> > I'm not sure whether the Cygwin code is correct. I did a peek with a
> > kernel debugger, and I see that FILE_RENAME_INFORMATION.RootDirectory
> > is always NULL if a file gets renamed to .cyg000000000xxxx. But if I
> > try that with NTFS or SMB, the NtSetInformationFile() to set
> > FileRenameInformation always fails.
>
> Your testcase is incorrect, unfortunately.
>
> >     fri->FileNameLength = (wcslen(dstfile)+1)*sizeof(wchar_t);
>
> For NT file paths, never count the trailing \0 to the length:
>
>       fri->FileNameLength = wcslen(dstfile) * sizeof (WCHAR);
>
> With that, your testcase works fine for me.
>
> On which filesystem did you see the problem?

Windows NFSv3 client (the builtin one, not the newer NFSv4.1 one).

Dan
-- 
Dan Shelton - Cluster Specialist Win/Lin/Bsd

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.