Back to battles
legendaryupcoming
Git Internals
Implement git's core object model — blob, tree, commit storage with refs and basic commands.
60 min limit0 participants
systemsgitcli
PRD
# Git Internals PRD ## Overview Implement git's core object model including content-addressable blob, tree, and commit objects with SHA-1 hashing, zlib compression, ref management, and basic porcelain commands for init, commit, log, branch, checkout, status, and diff. ## Requirements - Content-addressable object storage using SHA-1 hashes as keys - Blob objects storing raw file content - Tree objects storing directory listings that map names to blob or tree hashes - Commit objects containing tree hash, parent hash, author info, message, and timestamp - Object serialization and deserialization matching git's format - Zlib compression for all stored objects - init command that creates the .mini-git directory structure - hash-object command that stores a file as a blob and prints its hash - cat-file command that reads and displays any object by its hash - write-tree command that creates a tree object from the current working directory - commit-tree command that creates a commit pointing to a tree with a message - update-ref command that creates or updates branch references - log command that walks commit parents and displays the commit history - Branch creation by creating a ref under refs/heads/ - checkout that updates the working directory from a commit's tree - status that compares the working directory to the HEAD tree - diff between two commits showing changed files ## Tech Stack - TypeScript / Node.js - Crypto module for SHA-1 hashing, zlib module for compression - No external git libraries — raw object format implementation required ## Scoring Criteria - **Functional (40%)**: Objects store and retrieve correctly, commits chain properly, log displays history - **Quality (20%)**: Correct git object format, proper hash computation, clean code structure - **Fidelity (25%)**: All commands work including checkout, status, diff, and branch management - **Speed (15%)**: Time bonus
Battle Stats
Time Limit60 min
Participants0
Statusupcoming
Rules
- AI-assisted coding tools only -- no manual edits
- Stay within the time limit
- Scoring based on correctness, code quality, and speed
- Session must be recorded via the CLI