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

Re: Git rebase dies with fatal: Unable to create '.../.git/index.lock': File exists.

From
Jeff King <peff@peff.net>
Date
Sep 16, 2013, 21:15 UTC
Message-ID
<20130916211501.GA5477@sigill.intra.peff.net>
In-Reply-To
<20130916182852.GA14513@obsidianresearch.com>
On Mon, Sep 16, 2013 at 12:28:52PM -0600, Jason Gunthorpe wrote:
Show 12 quoted lines
> I have emacs windows open that have files within the git tree open in
> them. My emacs has vc-git mode loaded and global-auto-revert-mode set.
> 
> During the rebase the files open in emacs are changed by git, when
> emacs notices this (which is random with respect to the ongoing
> rebase) it auto reverts and runs git commands (due to vc-git), which
> causes the rebase to randomly fail.
> 
> Worse, I've noticed that this also randomly seems to cause the rebase
> to loose a commit if you --continue from that point.
> 
> Can git have some retry in the locking so this doesn't happen?

I'm not clear on which git commands are being run. If they are actually mutating the index, then isn't this more than a lock contention issue? In other words, "git rebase" is assuming nobody is mucking with the index while it runs; if emacs is doing so, then the results could be quite confusing, even if we retried the lock acquisition.

-Peff
Previous: Jason GunthorpeNext: Jason Gunthorpe
Message 2 of 4 in “Git rebase dies with fatal: Unable to create '.../.git/index.lock': File exists.”
  1. Jason GunthorpeSep 16, 2013
  2. Jeff KingSep 16, 2013
  3. Jason GunthorpeSep 16, 2013
  4. Jeff KingSep 16, 2013

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.