mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-25 06:07:43 +00:00
489838e6a2
* Git branch: read from HEAD on newly init repo On a newly initialized git repo, there are no branches created until a commit is made. Previously, starship handled this by having a default branch "master" for when branch `head` could not be read. However, if a user wants to set a different default branch name, that name won't appear on starship until a commit is made to the branch. If git2 provides a way to read the default branch name, we can use that, but at the moment it's not obvious how. For the moment, we can directly read `.git/HEAD`, which contains the name of the default branch head reference. This commit implements this strategy. Closes #1327 * update git_branch test from unborn master to unborn default * cargo fmt |
||
---|---|---|
.. | ||
fixtures | ||
testsuite |