Skip to content

Commit

Permalink
Refactory of #hg_current_branch in mercurial plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassmagal committed Oct 8, 2012
1 parent 7163095 commit 5ec68ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/mercurial/mercurial.plugin.zsh
Expand Up @@ -14,9 +14,8 @@ alias hgs='hg status'
alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'

function hg_current_branch() {
if [ -d .hg ]; then
echo $(hg branch)
fi
local ref=$(hg branch 2>/dev/null) || return
echo $ref
}

function parse_hg_dirty() {
Expand Down

0 comments on commit 5ec68ff

Please sign in to comment.