How omkarlande/my-own-git works
Key Components to Include:
Command Layer
• Main entry point (cmd/mygit/main.go)
• Shell script interface (mygit.sh)
Core Operations
• Repository Initialization
• Blob Writing
• Blob Reading
• Tree Writing
• Tree Reading
• Commit Creation
• Repository Cloning
Storage Layer
• Object storage system
• .git directory structure that gets created
• Demonstrate blob storage mechanism
Use a top-down approach with these levels
┌─────────────────────────┐
• Command Interface │ → mygit.sh and main.go
• ┬──────────────┘
• ↓
┌─────────────────────────┐
• Command Handlers │ → init, hash-object, cat-file
• ┬──────────────┘
• ↓
┌─────────────────────────┐
• Core Operations │ → Blob operations, future tree/commit ops
• ┬──────────────┘
• ↓
┌─────────────────────────┐
• Storage Layer │ → .git directory and object storage
• ┘
Data Flow Representation
• How data moves from file input through blob creation
• Demonstrate the hash generation process
• Object storage and retrieval paths
Specific Elements
• Command parsing flow
• Object hashing mechanism
• Storage directory structure
• Content addressing system
• Future extension points
Technical Details
• Golang implementation notation
• SHA-1 hash usage
• File system interactions
• Content compression (if implemented)