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

[BUG] "git checkout branch" on full disk doesn't recover from errors

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 13, 2007, 23:33 UTC
Message-ID
<200706140133.42513.jnareb@gmail.com>

I have accidentally (errorneous program running in parallel) run "git checkout gitweb/web" (where 'gitweb/web' is a branch) on a full disk. Git correctly notices error, but doesn't recover fully from it.

  $ git checkout gitweb/web
  fatal: unable to write new index file

It would be nice if git has shown also the error message from filesystem (from OS), for example if it was full disk, read-only filesystem (for example wrong mount options, or running from CD), or incorrect permissions.

  $ <free disk space>
  $ git checkout gitweb/web
  fatal: Entry '.gitignore' not uptodate. Cannot merge.

The '.gitignore' was last file changed in last commit on the page I was on (namely 'master'). It looks like git didn't recover fully from attempted branch change. "git diff" and "git status" shows many modified files, not only '.gitignore'.

What is a bit strange that mixed reset ("git reset HEAD") is not enough
  $ git reset HEAD
  <multitude of "needs update" messages>

Fortunately, it is easy to recover using "git reset --hard HEAD", although beginner user could have some problems with this.

-- 
Jakub Narebski
Poland
Message 1 of 1 in “[BUG] "git checkout branch" on full disk doesn't recover from errors”
  1. Jakub NarebskiJun 13, 2007

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.