Closed ezhlobo closed 3 years ago
We can simplify these functions:
https://github.com/datarockets/dotfiles/blob/8122aeb65d4b4cea78beb0300817dc7899e65aec/zsh/functions/git.zsh#L1-L5
https://github.com/datarockets/dotfiles/blob/8122aeb65d4b4cea78beb0300817dc7899e65aec/zsh/functions/git.zsh#L7-L11
By replacing $current_branch with HEAD.
$current_branch
HEAD
Recently I've been told by @atatarenko that there is an alias for current branch — HEAD.
Proof on https://git-scm.com
With this we can simplify it.
Other resources to consider before making such decisions:
We can simplify these functions:
https://github.com/datarockets/dotfiles/blob/8122aeb65d4b4cea78beb0300817dc7899e65aec/zsh/functions/git.zsh#L1-L5
https://github.com/datarockets/dotfiles/blob/8122aeb65d4b4cea78beb0300817dc7899e65aec/zsh/functions/git.zsh#L7-L11
By replacing
$current_branch
withHEAD
.Recently I've been told by @atatarenko that there is an alias for current branch —
HEAD
.Proof on https://git-scm.com
With this we can simplify it.
Other resources to consider before making such decisions: