Fix git branch indicator in subdirectories

Walk up directory hierarchy to find .git/HEAD instead of only checking cwd.

fixes #156
This commit is contained in:
Mario Zechner 2025-12-10 22:52:19 +01:00
parent 1fe87bc50d
commit 79f5c6d22e
2 changed files with 30 additions and 4 deletions

View file

@ -12,6 +12,8 @@
- **In-memory branching for `--no-session` mode**: Branching now works correctly in `--no-session` mode without creating any session files. The conversation is truncated in memory.
- **Git branch indicator now works in subdirectories**: The footer's git branch detection now walks up the directory hierarchy to find the git root, so it works when running pi from a subdirectory of a repository. ([#156](https://github.com/badlogic/pi-mono/issues/156))
## [0.18.1] - 2025-12-10
### Added