3

Git’s database internals II: commit history queries (GitHub blog)

 2 years ago
source link: https://lwn.net/Articles/906501/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Git’s database internals II: commit history queries (GitHub blog)

[Posted August 30, 2022 by corbet]

The GitHub blog has posted a detailed look at how Git stores the commit history to be able to quickly answer queries.

The commit-graph file provides a location for adding new information to our commits that do not exist in the commit object format by default. The new information that we store is called a generation number. There are multiple ways to compute a generation number, but the most important property we need to guarantee is the following:

If the generation number of a commit A is less than the generation number of a commit B, then A cannot reach B.


(Log in to post comments)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK