Senior LevelGit & GitHub
What is the Commit-Graph file (.git/objects/info/commit-graph) and how does it accelerate DAG traversal?
❓ Interview Prompt: Explain the binary Commit-Graph file format, pre-computed DAG generation numbers, reachability calculations, and git commit-graph write.
The Commit-Graph binary file stores pre-computed commit DAG generation numbers and reachability metrics in a single file, accelerating git log --graph and merge base queries by up to 50x.
Code Implementation Example
bash
git commit-graph write --reachable --changed-paths💡Pre-computing DAG generation numbers using git commit-graph write.
🎯 Interview Key Takeaway
The Commit-Graph binary file stores pre-computed DAG topology, accelerating git log and merge base queries by up to 50x.
#Commit-Graph#DAG Traversal#Performance#Senior
Back to all Git & GitHub Questions→