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

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:55:45

Junio C Hamano [off-list ref] 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/

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

From: George Karpenkov <hidden>
Date: 2016-06-15 22:55:45

Thanks everyone!

Progress so far:

After executing reverse sed command:
find .git -name '*.*' -exec sed -i 's/    /\t/g' {} \;

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
[off-list ref] wrote:
Junio C Hamano [off-list ref] writes:
quoted
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/

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

From: Philip Oakley <hidden>
Date: 2016-06-15 22:55:45

From: "George Karpenkov" <redacted>
Sent: Monday, January 14, 2013 10:57 PM
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 ;-)
And trying to switch the branch I get:
quoted
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
[off-list ref] wrote:
quoted
Junio C Hamano [off-list ref] writes:
quoted
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/
--

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

From: George Karpenkov <hidden>
Date: 2016-06-15 22:55:46

Happy ending!

Turns out i have actually made a backup 3 days ago.

My other work was on a branch + in a stash. Commits done on a branch
were already present in a backup.
I was able to get the stash working by copying corrupted .pack files
from the backup, luckily all the new work wasn't packed yet.

So i've just verified the log messages to see that no new commits were
made, created a patch from the corrupted git repo of the stash,
applied it on the backup, and wo-hooo, everything worked.
And then I've pushed to origin to avoid such silliness in the future.

Thanks and Regards,
George

On Tue, Jan 15, 2013 at 10:45 AM, Philip Oakley [off-list ref] wrote:
From: "George Karpenkov" <redacted>
Sent: Monday, January 14, 2013 10:57 PM
quoted
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 ;-)
quoted
And trying to switch the branch I get:
quoted
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
[off-list ref] wrote:
quoted
Junio C Hamano [off-list ref] writes:
quoted
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/
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help