Use escaped git function, so it doesn't go through any aliases like hub

This commit is contained in:
Nathan Broadbent
2012-08-12 21:32:05 +12:00
parent 240399bd92
commit c4f49c96d7

View File

@@ -167,10 +167,10 @@ function _git_index_count() {
# Returns the current git branch (returns nothing if not a git repository) # Returns the current git branch (returns nothing if not a git repository)
function is_git_dirty { function is_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" [[ $(\git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
} }
function parse_git_branch { function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(is_git_dirty)]/" \git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"
} }
# If the working directory is clean, update the git repository. Otherwise, show changes. # If the working directory is clean, update the git repository. Otherwise, show changes.