From de5223db5d99bda974c28820055a286e0e604a61 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 14 Mar 2008 21:52:07 +0100 Subject: Get the git-commit-ish when named-rev is undefined. (Corrects commit 9088c1576c25eb8ab0e8ad466c1353bcfe4fbd39) --- 01_Functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_Functions.zsh b/01_Functions.zsh index 78c024d..7a29c13 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -71,7 +71,7 @@ get_git_branch () my_git_branch="($(git-name-rev HEAD 2>&- | awk '{ print $2 }' | sed 's,^tags/,,;s,^remotes/,,'))" # If neither on a named commit-ish, show abbreviated commit-id - [ "$my_git_branch" == "" ] &&\ + [ "$my_git_branch" == "(undefined)" ] &&\ my_git_branch="($(git-show --pretty=format:%H 2>&- | head -n1))" fi -- cgit v1.2.3