Optimized the branch information retrieval logic to reduce subprocess overhead.
- Used git for-each-ref with %(ahead-behind) for O(1) merge status checking.
- Implemented robust fallback for Git versions < 2.41.0.
- Added dynamic default branch detection (main/master).
- Consolidated local, remote, and merged branch retrieval.
- Fixed current branch marker detection.
This change reduces the number of Git subprocess calls in the main reporting path while maintaining full compatibility with older environments.