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

Re: Having an invalid HEAD file causes git not to recognize the repository

From
EEEgon Elbre <egonelbre@gmail.com>
Date
Aug 21, 2012, 08:07 UTC
Message-ID
<CANtNKfr1SMvpOrjowk+ewk2aiwiZCUzRwuw4wHFjQ3N-BmGikg@mail.gmail.com>
In-Reply-To
<20120821072403.GD3238@sigill.intra.peff.net>
On Tue, Aug 21, 2012 at 10:24 AM, Jeff King <peff@peff.net> wrote:
Show 11 quoted lines
>
>> I ran into this problem when I had a BSOD during a rebase (ignore that
>> I'm having to use Windows). This meant that only half of the hash got
>> written into HEAD and all git commands I tried failed.
>
> That generally shouldn't happen, as we write new ref content to a
> temporary file and then rename it into place atomically. I wonder if
> there is a problem with the atomicity there (we do not fsync after
> close, which some filesystems might want), or if it was simply
> filesystem corruption related to your BSOD.
>

It's a truecrypt drive and I had to run diskcheck on the drive (because of bad unmounting). In essence the file could have been invalid and just restored it to some invalid usable state. Also it might be truecrypt atomicity problem.

+egon
Previous: Jeff King
Message 3 of 3 in “Having an invalid HEAD file causes git not to recognize the repository”
  1. Egon ElbreAug 17, 2012
  2. Jeff KingAug 21, 2012
  3. Egon ElbreAug 21, 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.