mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
git functions cleanup
* moved current_branch implementation in lib/git.zsh and renamed to git_current_branch * renamed parse_git_dirty to git_parse_dirty, still backwards compatible
This commit is contained in:
parent
027fcccc92
commit
f8a602e6f9
2 changed files with 13 additions and 11 deletions
|
|
@ -49,11 +49,7 @@ alias gsd='git svn dcommit'
|
|||
# Will return the current branch name
|
||||
# Usage example: git pull origin $(current_branch)
|
||||
#
|
||||
function current_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
function current_branch() { git_current_branch }
|
||||
|
||||
function current_repository() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue