Re: windows: error cannot lock ref ... unable to create lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 18, 2019 at 10:01 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>
> On Tue, Jun 18, 2019 at 12:39 PM Anthony Sottile <asottile@xxxxxxxxx> wrote:
> > + git fetch origin --tags
> > Unpacking objects: 100% (10/10), done.
> > From https://github.com/asottile-archive/git-windows-branch-test
> >  * [new branch]      master     -> origin/master
> > error: cannot lock ref 'refs/remotes/origin/pr/aux': Unable to create
> > 'C:/Users/IEUser/x/x/.git/refs/remotes/origin/pr/aux.lock': No such
> > file or directory
> >  ! [new branch]      pr/aux     -> origin/pr/aux  (unable to update local ref)
>
> AUX is a reserved[1] filename on Windows. Quoting from that source:
>
>     Do not use the following reserved names for the name of a file:
>     CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7,
>     COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and
>     LPT9. Also avoid these names followed immediately by an
>     extension...
>
> The default Git "ref store" is filesystem-based, so a branch named
> "aux" is problematic. Other ref store implementations would not be
> subject to this limitation (though I'm not sure what the state of the
> others is -- someone with more knowledge can probably answer that).
>
> [1]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#naming-conventions

Oh of course, totally forgot about the special files on windows.

Thanks for the quick response and helpful link!

Anthony



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux