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

Re: Error:non-monotonic index after failed recursive "sed" command

From
Philip Oakley <philipoakley@iee.org>
Date
Jan 14, 2013, 23:43 UTC
Message-ID
<B10A5C9F770D48C9958F240D59B1A400@PhilipOakley>
In-Reply-To
<CAMoGvRKMwP_JBvNNWoN=m9AX3MP9xVgBUwxELHtry_-8Um8WKQ@mail.gmail.com>
From: "George Karpenkov" <george@metaworld.ru>
Sent: Monday, January 14, 2013 10:57 PM
Show 6 quoted lines
> Thanks everyone!
>
> Progress so far:
>
> After executing reverse sed command:
> find .git -name '*.*' -exec sed -i 's/    /\t/g' {} \;

Have you counted how many substitutions there are in the pack file(s). It may be sufficiently small that you can simply try all the possible combinations of fwd and reverse substitutions. Even if it takes a few days the computer won't get bored ;-)

Show 38 quoted lines
>
> And trying to switch the branch I get:
>
>> git checkout X
>
> error: failed to read object 51a980792f26875d00acb79a19f043420f542cfa
> at offset 41433013 from
> .git/objects/pack/pack-8d629235ee9fec9c6683d42e3edb21a1b0f6e027.pack
> fatal: packed object 51a980792f26875d00acb79a19f043420f542cfa (stored
> in .git/objects/pack/pack-
> 8d629235ee9fec9c6683d42e3edb21a1b0f6e027.pack) is corrupt
>
> So the actual .pack file is corrupt, unfortunately.
>
> On Tue, Jan 15, 2013 at 6:13 AM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>>
>>> Everybody seems to be getting an impression that .idx is the only
>>> thing that got corrupt.  Where does that come from?
>>
>> It's the only thing that appear in the error message. This does not
>> imply that it is the only corrupt thing, but gives a little hope that 
>> it
>> may still be the case.
>>
>> Actually, I thought the "read-only" protection should have protected
>> files in object/ directory, but a little testing shows that "sed -i"
>> gladly accepts to modify read-only files (technically, it does not
>> modify it, but creates a temporary file with the new content, and 
>> then
>> renames it to the new location). So, the hope that pack files are
>> uncorrupted is rather thin unfortunately.
>>
>> --
>> Matthieu Moy
>> http://www-verimag.imag.fr/~moy/
> --
Previous: George KarpenkovNext: George Karpenkov
Message 8 of 9 in “Error:non-monotonic index after failed recursive "sed" command”
  1. George KarpenkovJan 14, 2013
  2. Matthieu MoyJan 14, 2013
  3. John KeepingJan 14, 2013
  4. Johannes SixtJan 14, 2013
  5. Junio C HamanoJan 14, 2013
  6. Matthieu MoyJan 14, 2013
  7. George KarpenkovJan 14, 2013
  8. Philip OakleyJan 14, 2013
  9. George KarpenkovJan 15, 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.