diff options
author | Kevin Ballard <kevin@sb.org> | 2012-06-25 15:19:47 -0700 |
---|---|---|
committer | Kevin Ballard <kevin@sb.org> | 2012-06-25 15:19:47 -0700 |
commit | 1eddc79a9008b360a11fb049de508cf20682fea6 (patch) | |
tree | 21d11e3e85160e9a6a2a490e83bb4d265e6240e9 /share | |
parent | ccfc909eb2e754cc4558e258c011e8c9000559f5 (diff) |
Remove __fish_git_prompt's switch bug workaround
With the switch bug fixed, __fish_git_prompt can be very slightly
simplified by not recording the exit status of every case in the
describe style switch individually.
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/__fish_git_prompt.fish | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index 2c84cad9..dd1f17ea 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -237,14 +237,14 @@ function __fish_git_prompt --description "Prompt function for Git" if test $os -ne 0 set b (switch "$__fish_git_prompt_describe_style" case contains - git describe --contains HEAD; set os $status + git describe --contains HEAD case branch - git describe --contains --all HEAD; set os $status + git describe --contains --all HEAD case describe - git describe HEAD; set os $status + git describe HEAD case default '*' - git describe --tags --exact-match HEAD; set os $status - end ^/dev/null) + git describe --tags --exact-match HEAD + end ^/dev/null; set os $status) if test $os -ne 0 set b (cut -c1-7 $git_dir/HEAD ^/dev/null; set os $status) if test $os -ne 0 |