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

Re: Regular Rebase Failure

From
Stefan Beller <sbeller@google.com>
Date
Apr 21, 2015, 17:51 UTC
Message-ID
<CAGZ79kadXgsdCLH-YFQ5RhyKbRv9-qmUOQo-9QkKM2=8p17j+g@mail.gmail.com>
In-Reply-To
<553685E0.8010304@gmail.com>
On Tue, Apr 21, 2015 at 10:16 AM, Adam <adamgsteel@gmail.com> wrote:
> About two weeks ago I started getting a regular rebase failure. I get this
> error several times a day and at least once a day I lose work to it.
Which git version are you using?
> ---
> fatal: Unable to create '/Users/asteel/path/to/repo/.git/index.lock': File
> exists.

Searching through the code base there are only 3 occurrences of "Unable to create" matching the capitalization of the letters. (we have many more error messages where the U is lower case)

The first occurrence is in refs.c create_symref
    if (rename(lockpath, git_HEAD) < 0) {
        error("Unable to create %s", git_HEAD);
        goto error_unlink_return;
    }

The other 2 occurrences are in the lockfile.c so any place using lock files may trigger that error.

Show 10 quoted lines
>
> If no other git process is currently running, this probably means a
>
> git process crashed in this repository earlier. Make sure no other git
>
> process is running and remove the file manually to continue.
>
> Could not apply 71a...
> ---
> The weird part is that the file does not exist

Not anymore when you're looking I guess, as git creates and deletes a lock file for the index quite frequently. Also when a git command shuts down roughly as expected (such as when calling a die(error message) as opposed to being terminated by the operating system), then the exit handler makes sure to remove all the lock files it held.

Show 6 quoted lines
>
> Any ideas? Thanks!
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: AdamNext: Stefan Beller
Message 2 of 7 in “Regular Rebase Failure”
  1. AdamApr 21, 2015
  2. Stefan BellerApr 21, 2015
  3. Stefan BellerApr 21, 2015
  4. Jeff KingApr 21, 2015
  5. Stefan BellerApr 27, 2015
  6. Phil HordApr 29, 2015
  7. Adam SteelApr 29, 2015

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.