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

Re: Git commit error: fatal: Repository has been updated, but unable to write new_index file.

From
Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Date
Mar 27, 2012, 14:28 UTC
Message-ID
<8646D039-536E-4E6B-9D9B-01E0FB8D1C69@jetbrains.com>
In-Reply-To
<20120327083625.GA4159@ikke-laptop.buyways.nl>
27.03.2012, в 12:36, Kevin:
> This might look like some kind of race condition where multiple commands
> are executed at the same time, causing the lock file to be hold.
> 
> Could you check if something like that is happening somewhere?

I thought about it, but we've got a software lock that prevents such a collision, and it seems to work pretty good: we've never had lock problems in any other cases, and in this case the problem also seems to be quite rare - it is experienced only by a few of users, although rather frequently. Moreover, there are no parallel Git activities in this case anyway, only git add followed by git commit.

Btw, lock-conflicting errors are usually reported by Git as fatal: Unable to create 'project_path/.git/index.lock': File exists.

Show 42 quoted lines
> 
> On Tue, Mar 27, 2012 at 11:35:08AM +0400, Kirill Likhodedov wrote:
>> 
>> Reposting, since there were no replies - probably, the message was missed.
>> I would appreciate help in understanding what the Git error could be cause by.
>> Thanks!
>> 
>> -------
>> 
>> Hello,
>> 
>> I'm developing a Git integration with an IDE. Several users of the program report the following error which was returned by Git during commit:
>> 
>> fatal: Repository has been updated, but unable to write
>> new_index file. Check that disk is not full or quota is
>> not exceeded, and then "git reset HEAD" to recover.
>> 
>> Here is the command which IDE executes to make a commit: 
>> 
>> # git commit --only -F <message file> -- <several files chosen to commit>
>> 
>> The interesting thing is that commit was actually successful, i.e. all files are committed, git status reports correctly, no other mistakes were noticed by users.
>> Here is the bugreport with some more details: http://youtrack.jetbrains.com/issue/IDEA-82108
>> One of the users says, that the situation happens quite often.
>> 
>> Users say that the thing has never happened with them while they were using Tortoise Git, so I'm pretty sure, that it is my bug caused my some misusage of Git (although I asked users to perform more experiments).
>> 
>> Unfortunately, I didn't find any information about the possible cause of this error.
>> 
>> Could you please help me to figure out why it can happen? What situation can lead to this error?
>> 
>> Thanks a lot.
>> 
>> ----------------------------------
>> Kirill Likhodedov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> --
>> 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: KevinNext: Ben Tebulin
Message 3 of 7 in “Git commit error: fatal: Repository has been updated, but unable to write new_index file.”
  1. Kirill LikhodedovMar 27, 2012
  2. KevinMar 27, 2012
  3. Kirill LikhodedovMar 27, 2012
  4. Ben TebulinMar 27, 2012
  5. KevinMar 27, 2012
  6. SylvainMay 15, 2012
  7. Heiko VoigtMay 15, 2012

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.