Home Explore Blog CI



git

2nd chunk of `Documentation/gitformat-commit-graph.adoc`
1bd4f6791ff8739f9b6f90a397dc57ce731e6e61ce929aae00000001000009f0
 next 8 bytes are for the positions of the first two parents
      of the ith commit. Stores value 0x70000000 if no parent in that
      position. If there are more than two parents, the second value
      has its most-significant bit on and the other bits store an array
      position into the Extra Edge List chunk.
    * The next 8 bytes store the topological level (generation number v1)
      of the commit and
      the commit time in seconds since EPOCH. The generation number
      uses the higher 30 bits of the first 4 bytes, while the commit
      time uses the 32 bits of the second 4 bytes, along with the lowest
      2 bits of the lowest byte, storing the 33rd and 34th bit of the
      commit time.

==== Generation Data (ID: {'G', 'D', 'A', '2' }) (N * 4 bytes) [Optional]
    * This list of 4-byte values store corrected commit date offsets for the
      commits, arranged in the same order as commit data chunk.
    * If the corrected commit date offset cannot be stored within 31 bits,
      the value has its most-significant bit on and the other bits store
      the position of corrected commit date into the Generation Data Overflow
      chunk.
    * Generation Data chunk is present only when commit-graph file is written
      by compatible versions of Git and in case of split commit-graph chains,
      the topmost layer also has Generation Data chunk.

==== Generation Data Overflow (ID: {'G', 'D', 'O', '2' }) [Optional]
    * This list of 8-byte values stores the corrected commit date offsets
      for commits with corrected commit date offsets that cannot be
      stored within 31 bits.
    * Generation Data Overflow chunk is present only when Generation Data
      chunk is present and at least one corrected commit date offset cannot
      be stored within 31 bits.

==== Extra Edge List (ID: {'E', 'D', 'G', 'E'}) [Optional]
      This list of 4-byte values store the second through nth parents for
      all octopus merges. The second parent value in the commit data stores
      an array position within this list along with the most-significant bit
      on. Starting at that array position, iterate through this list of commit
      positions for the parents until reaching a value with the most-significant
      bit on. The other bits correspond to the position of the last parent.

==== Bloom Filter Index (ID: {'B', 'I', 'D', 'X'}) (N * 4 bytes) [Optional]
    * The ith entry, BIDX[i], stores the number of bytes in all Bloom filters
      from commit 0 to commit i (inclusive) in lexicographic

Title: Git Commit-Graph Format: Chunk Data
Summary
The Git commit-graph format includes various chunks, such as Commit Data, Generation Data, Generation Data Overflow, Extra Edge List, and Bloom Filter Index, which store information about commits, including parent relationships, generation numbers, commit dates, and Bloom filters, to optimize Git operations.