Function get_current
Source pub fn get_current() -> Result<String>
Expand description
Get current branch name (fails if HEAD detached).
§Errors
- Repository discovery fails.
- HEAD is detached.
- Branch shorthand not valid UTF-8.
§Future Work
- Provide enum distinguishing detached state instead of error.