git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Anthony Sottile <asottile@umich.edu>
Date
Jun 18, 2019, 16:41 UTC
Message-ID
<CA+dzEBniPBM9qyR9gq=8sKtc8ieUkq6HGfUuZSc5=UdovR5wkw@mail.gmail.com>
In-Reply-To
<CA+dzEB=iOsfuZQ5Z8uXO+k6E3WczkLX64yWUpTm1NZBjdd47kg@mail.gmail.com>
hit send too quickly, here's my version information:

$ git --version git version 2.22.0.windows.1

On Tue, Jun 18, 2019 at 9:38 AM Anthony Sottile <asottile@umich.edu> wrote:
Show 38 quoted lines
>
> I've set up a demo problematic repository on github:
> https://github.com/asottile-archive/git-windows-branch-test
>
> The minimal reproduction is:
>
> rm -rf x
> git init x
> cd x
> git remote add origin https://github.com/asottile-archive/git-windows-branch-te>
> git fetch origin --tags
>
> Here's the output:
>
> + git init x
> Initialized empty Git repository in C:/Users/IEUser/x/x/.git/
> + cd x
> + git remote add origin
> https://github.com/asottile-archive/git-windows-branch-test
> + git fetch origin --tags
> remote: Enumerating objects: 10, done.
> remote: Counting objects: 100% (10/10), done.
> remote: Compressing objects: 100% (4/4), done.
> remote: Total 10 (delta 0), reused 0 (delta 0), pack-reused 0
> 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)
>
>
> real-world issue: https://github.com/pre-commit/pre-commit/issues/1058
>
> Thanks
>
> Anthony
Previous: Anthony SottileNext: Eric Sunshine
Message 2 of 6 in “windows: error cannot lock ref ... unable to create lock”
  1. Anthony SottileJun 18, 2019
  2. Anthony SottileJun 18, 2019
  3. Eric SunshineJun 18, 2019
  4. Anthony SottileJun 18, 2019
  5. Philip OakleyJun 22, 2019
  6. Johannes SchindelinJun 24, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.