mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-30 04:13:06 +01:00
A git dir path may contain a newline, so splitting the combined rev-parse output on newlines can leave the branch somewhere past element 2. The branch is always the final line, so read it from the end. parse_git_dirty only needs to know whether the porcelain output is empty. Read a single line with the read builtin instead of capturing every line, so a worktree with many changes doesn't build a large string on each prompt. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>