Skip to main content
added 189 characters in body
Source Link
Jörg W Mittag
  • 367.7k
  • 78
  • 450
  • 657

Tags aren't objects in the sense above. They are not part of the object store and don't have a hash. They are references to objects. (Note: any object can be tagged, not just commits, although that is the normal use case.)

Notes allow you to associate an arbitrary blobcommit with an arbitrary Git object.

The storage of notes is a little more complicated. Actually, notes area note is just a commit (containing a tree containing blobs containing the contents of the note). Git creates a special branch for notes and the association between the note blobcommit and its "annotee object" happens there. I am not familiar with exactly how.

However, since a note is just a blobcommit, and the association happens externally, the hash of a note is just its contentthe same as any other commit.

Tags aren't objects in the sense above. They are not part of the object store and don't have a hash. They are references to commits.

Notes allow you to associate an arbitrary blob with an arbitrary Git object.

The storage of notes is a little more complicated. Actually, notes are just blobs. Git creates a special branch for notes and the association between the note blob and its "annotee object" happens there. I am not familiar with exactly how.

However, since a note is just a blob, and the association happens externally, the hash of a note is just its content.

Tags aren't objects in the sense above. They are not part of the object store and don't have a hash. They are references to objects. (Note: any object can be tagged, not just commits, although that is the normal use case.)

Notes allow you to associate an arbitrary commit with an arbitrary Git object.

The storage of notes is a little more complicated. Actually, a note is just a commit (containing a tree containing blobs containing the contents of the note). Git creates a special branch for notes and the association between the note commit and its "annotee object" happens there. I am not familiar with exactly how.

However, since a note is just a commit, and the association happens externally, the hash of a note is just the same as any other commit.

added 44 characters in body
Source Link
Jörg W Mittag
  • 367.7k
  • 78
  • 450
  • 657

Here's a simple Perl one-liner to un-deflateHere's a simple Perl one-liner to un-deflate (is that inflate?) a stream:

Here's a simple Perl one-liner to un-deflate (is that inflate?) a stream:

Here's a simple Perl one-liner to un-deflate (is that inflate?) a stream:

added 120 characters in body
Source Link
Jörg W Mittag
  • 367.7k
  • 78
  • 450
  • 657

Most formats are textual formats, based on simple ASCII. For example, the size is not encoded as a binary integer, but as a decimal integer with each digit represented as the corresponding ASCII character.

#Compression

Loose (i.e. not packed) objects are just zlib-deflated. You can un-gzipdeflate them (or use zless) and just look at them to see how they are structured. Note that the uncompressed octet stream is exactly what is being hashed; the objects are stored compressed but hashed before they are compressed.

Here's a simple Perl one-liner to un-deflate (is that inflate?) a stream:

perl -MCompress::Zlib -e 'undef $/; print uncompress(<>)'

#Compression

Loose (i.e. not packed) objects are just zlib-deflated. You can un-gzip them (or use zless) and just look at them to see how they are structured. Note that the uncompressed octet stream is exactly what is being hashed; the objects are stored compressed but hashed before they are compressed.

Most formats are textual formats, based on simple ASCII. For example, the size is not encoded as a binary integer, but as a decimal integer with each digit represented as the corresponding ASCII character.

#Compression

Loose (i.e. not packed) objects are just zlib-deflated. un-deflate them and just look at them to see how they are structured. Note that the uncompressed octet stream is exactly what is being hashed; the objects are stored compressed but hashed before they are compressed.

Here's a simple Perl one-liner to un-deflate (is that inflate?) a stream:

perl -MCompress::Zlib -e 'undef $/; print uncompress(<>)'
added 1952 characters in body
Source Link
Jörg W Mittag
  • 367.7k
  • 78
  • 450
  • 657
Loading
Source Link
Jörg W Mittag
  • 367.7k
  • 78
  • 450
  • 657
Loading