From: Thomas Rast <trast@student.ethz.ch>
To: "Magnus Bäck" <magnus.back@sonyericsson.com>
Cc: <git@vger.kernel.org>
Subject: Re: Inspecting a corrupt git object
Date: Wed, 4 Aug 2010 11:48:49 +0200 [thread overview]
Message-ID: <201008041148.49668.trast@student.ethz.ch> (raw)
In-Reply-To: <20100804092530.GA30070@jpl.local>
Magnus Bäck wrote:
>
> $ head -n 1 /tmp/hexdump_corrupt.txt
> 00000000 78 9c 2b 29 4a 4d 55 30 32 36 62 30 34 30 30 33 |x.+)JMU026b04003|
> $ head -n 1 /tmp/hexdump_okay.txt
> 00000000 78 01 2b 29 4a 4d 55 30 32 36 62 30 34 30 30 33 |x.+)JMU026b04003|
>
> From what I gather from the community book and Pro Git, a git object
> file is a deflated representation of the object type as a string, the
> payload size, a null byte, and the payload. Is there a standard tool for
> inflating the file back so that I can inspect what the actual difference
> between these two are? Short of writing a tool utilizing zlib, at least.
I'm sure it's a one-liner in almost any scripting language, e.g. you
can use
python -c 'import sys,zlib; sys.stdout.write(zlib.decompress(open(sys.argv[1]).read()))'
with a filename argument if you have Python at hand.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2010-08-04 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 9:25 Inspecting a corrupt git object Magnus Bäck
2010-08-04 9:48 ` Alejandro Riveira Fernández
2010-08-04 13:09 ` Magnus Bäck
2010-08-04 9:48 ` Thomas Rast [this message]
2010-08-04 13:02 ` Magnus Bäck
2010-08-04 11:11 ` Holger Hellmuth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201008041148.49668.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=magnus.back@sonyericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).