How gitgitgadget/git works
Git is a distributed revision-control system exposed through a command-line interface, with high-level repository operations and lower-level object and reference management. The README establishes the product and its command-oriented use; the sampled source shows repository initialization and its dependencies, plus object-database and reference-storage implementation areas. Many major commands and subsystems are present in the tree but were not sampled, so their internal call paths are not asserted here.
Main entry points: repository.c Repository setup · source-files.c File object store · odb.h Object database · refs.h Reference API
Components 28
Git commands
- Git CLI
git.c - Checkout worker
builtin/checkout--worker.c - Diff engine
diff.c - Merge engine
merge-ort.c - Transport
transport.c - Branch operations
builtin/branch.c - Revision walking
revision.h
Repository state
- Repository setup
repository.c - Repository state
repository.h - Configuration
config.h - Index cache
read-cache.c - Worktree scanning
dir.h
Object storage
- Object database
odb.h - File object store
odb/source-files.c - Object model
object.h - Pack creation
builtin/pack-objects.c
References
- Reference API
refs.h - Files backend
refs/files-backend.c - Reftable backend
refs/reftable-backend.c
Core primitives
- Hash primitives
hash.h - Path utilities
abspath.h - String buffers
strbuf.h - Process execution
run-command.h - Trace events
trace2.h - Repository settings
repo-settings.h - Environment
environment.h - Platform compatibility
git-compat-util.h
Other components
- Git user
Connections 9
- Git user → Git CLI: runs commands
- Repository setup → Object database: initializes storage
repository.c - Repository setup → Configuration: reads configuration
repository.c - Repository setup → Repository state: initializes
repository.c - File object store → Object database: implements access
odb/source-files.c - File object store → Object model: uses object files
odb/source-files.c - File object store → Pack creation: uses pack support
odb/source-files.c - Files backend → Reference API: implements operations
refs/files-backend.c - Reftable backend → Reference API: implements operations