Skip to main content
Add links. Improve formatting.
Source Link
Greg Bacon
  • 138k
  • 34
  • 192
  • 250

Look at

   http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#object-details“Object storage format” in Git User Manual.

itIt is raw compressed data using zlibzlib. One can use 'zpipe'zpipe from the 'zlib1g-dev' package. Compile (compile the examplethe example with 'gcc -o zpipe zpipe.c -lz')gcc -o zpipe zpipe.c -lz. It is not a standard .gz.gz or something.

$ ./zpipe -d < .git/objects/02/43019ddb4d94114e5a8580eec01baeea195133

./zpipe -d < .git/objects/02/43019ddb4d94114e5a8580eec01baeea195133

prints the content of the blob (header+data)

If you want to check the shaSHA-1, you have to put the uncompressed blob in a file (myblobmyblob) and do

$ sha1sum myblob

sha1sum myblob

Look at

 http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#object-details

it is raw compressed data using zlib. One can use 'zpipe' from the 'zlib1g-dev' package (compile the example with 'gcc -o zpipe zpipe.c -lz'). It is not a standard .gz or something.

$ ./zpipe -d < .git/objects/02/43019ddb4d94114e5a8580eec01baeea195133

prints the content of the blob (header+data)

If you want to check the sha-1, you have to put the uncompressed blob in a file (myblob) and do

$ sha1sum myblob

Look at  “Object storage format” in Git User Manual.

It is raw compressed data using zlib. One can use zpipe from the 'zlib1g-dev' package. Compile the example with gcc -o zpipe zpipe.c -lz. It is not a standard .gz or something.

./zpipe -d < .git/objects/02/43019ddb4d94114e5a8580eec01baeea195133

prints the content of the blob (header+data)

If you want to check the SHA-1, you have to put the uncompressed blob in a file (myblob) and do

sha1sum myblob
Source Link
xof
  • 116
  • 1
  • 2

Look at

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#object-details

it is raw compressed data using zlib. One can use 'zpipe' from the 'zlib1g-dev' package (compile the example with 'gcc -o zpipe zpipe.c -lz'). It is not a standard .gz or something.

$ ./zpipe -d < .git/objects/02/43019ddb4d94114e5a8580eec01baeea195133

prints the content of the blob (header+data)

If you want to check the sha-1, you have to put the uncompressed blob in a file (myblob) and do

$ sha1sum myblob