diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-05 18:47:55 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-05 18:47:55 +0200 |
commit | fd134c8175effefe4d965fc15b1ff6beb8f7cf6d (patch) | |
tree | 3c719094e1b08042f0ab8be9f38a303dab804f47 | |
parent | e679734f4cb152400cd60f8285f8f325bc530786 (diff) |
[Git] Get corrects HEAD name
-rw-r--r-- | 01_Internal.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh index b1aef67..02a4bf0 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -178,7 +178,7 @@ __get_git_branch () # Initial commit if [ -L $GIT_DIR/HEAD -a ! -f $GIT_DIR/HEAD ] then - my_git_branch="$(basename $GIT_DIR/$(LC_ALL=C stat --printf="%N\n" $GIT_DIR/HEAD | tr '`' "'" | cut -d\' -f4))" + my_git_branch="$(basename $(readlink -f $GIT_DIR/HEAD))" else my_git_branch="$(basename $GIT_DIR/$(cat $GIT_DIR/HEAD | sed 's/^\([0-9a-f]\{2\}\)\([0-9a-f]\{38\}\)$/objects\/\1\/\2/;s/^ref: //'))" fi |