mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-29 04:23:26 +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 |
||
---|---|---|
.. | ||
aws.rs | ||
character.rs | ||
cmd_duration.rs | ||
common.rs | ||
conda.rs | ||
configuration.rs | ||
directory.rs | ||
dotnet.rs | ||
env_var.rs | ||
git_branch.rs | ||
git_commit.rs | ||
git_state.rs | ||
git_status.rs | ||
hg_branch.rs | ||
hostname.rs | ||
jobs.rs | ||
line_break.rs | ||
main.rs | ||
modules.rs | ||
nix_shell.rs | ||
python.rs | ||
singularity.rs | ||
terraform.rs | ||
time.rs | ||
username.rs |