How romkatv/powerlevel10k works
This tree is the GitStatus C++ subsystem bundled with Powerlevel10k, not the Zsh theme’s full prompt implementation. Its runtime is a request/response service: it parses requests and options, obtains repository status through a repository cache and Git/index scans, then formats responses. The README describes Powerlevel10k’s fast, current Git prompt indicators, but does not document the service protocol. Dashed actor links therefore indicate the apparent service boundary; sampled references establish the internal links.
Main entry points: gitstatus.cc Service dispatch · repo.cc Repository status · index.cc Index scanning · git.cc Git metadata
Components 17
Service protocol
- Request parsing
gitstatus/src/request.cc - Runtime options
gitstatus/src/options.cc - Service dispatch
gitstatus/src/gitstatus.cc - Response encoding
gitstatus/src/response.cc
Git status engine
- Repository cache
gitstatus/src/repo_cache.cc - Repository status
gitstatus/src/repo.cc - Git metadata
gitstatus/src/git.cc - Index scanning
gitstatus/src/index.cc - Directory scanning
gitstatus/src/dir.cc - Directory mtime check
gitstatus/src/check_dir_mtime.cc - Tag lookup
gitstatus/src/tag_db.cc
Runtime support
- Arena allocation
gitstatus/src/arena.cc - Thread pool
gitstatus/src/thread_pool.cc - Logging
gitstatus/src/logging.cc - Timing
gitstatus/src/timer.cc - String utilities
gitstatus/src/strings.cc
Other components
- Prompt client
Connections 23
- Prompt client → Request parsing: sends requests
- Request parsing → Service dispatch: parsed requests
- Service dispatch → Runtime options: parses arguments
gitstatus/src/gitstatus.cc - Service dispatch → Repository cache: gets repositories
gitstatus/src/gitstatus.cc - Service dispatch → Repository status: queries status
gitstatus/src/gitstatus.cc - Service dispatch → Response encoding: builds responses
gitstatus/src/gitstatus.cc - Service dispatch → Thread pool: initializes workers
gitstatus/src/gitstatus.cc - Service dispatch → Timing: uses timing
gitstatus/src/gitstatus.cc - Repository cache → Repository status: caches repositories
gitstatus/src/repo_cache.cc - Repository cache → Git metadata: uses Git helpers
gitstatus/src/repo_cache.cc - Repository status → Index scanning: scans index
- Repository status → Tag lookup: looks up tags
- Repository status → Directory mtime check: checks directory times
gitstatus/src/repo.cc - Repository status → Git metadata: reads Git metadata
gitstatus/src/repo.cc - Repository status → Thread pool: schedules scans
gitstatus/src/repo.cc - Index scanning → Directory scanning: lists files
gitstatus/src/index.cc - Index scanning → Git metadata: uses Git helpers
gitstatus/src/index.cc - Index scanning → Thread pool: parallelizes scans
gitstatus/src/index.cc - Tag lookup → Git metadata: reads references
gitstatus/src/tag_db.cc - Directory scanning → Arena allocation: allocates entries
- Request parsing → String utilities: formats fields
gitstatus/src/request.cc - Service dispatch → Logging: uses logging
gitstatus/src/gitstatus.cc - Prompt client → Response encoding: receives status