aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2013-01-29 12:59:34 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-30 22:02:51 -0800
commit7df89566f389e5a1e7df85f7b6584a105ec3072c (patch)
tree28649a0e30448ba15bf5523dad0994ba1b4088c8 /share
parent32b2c9fc9ee43cae9db9e6032086599df0d68354 (diff)
Fix __fish_git_prompt's upstream indicator for git-svn branches
Diffstat (limited to 'share')
-rw-r--r--share/functions/__fish_git_prompt.fish8
1 files changed, 2 insertions, 6 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish
index 52579cee..0e226b01 100644
--- a/share/functions/__fish_git_prompt.fish
+++ b/share/functions/__fish_git_prompt.fish
@@ -124,7 +124,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
set -l svn_upstream (git log --first-parent -1 --grep="^git-svn-id: \($svn_url_pattern\)" ^/dev/null)
if test (count $svn_upstream) -ne 0
echo $svn_upstream[-1] | read -l _ svn_upstream _
- set svn_upstream (echo $svn_upstream | sed 's/@.*//')
+ set svn_upstream (/bin/sh -c 'echo "${1%@*}"' -- $svn_upstream)
set -l cur_prefix
for i in (seq (count $svn_remote))
set -l remote $svn_remote[$i]
@@ -145,11 +145,7 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
set upstream git-svn
end
else
- if test (echo $svn_upstream | cut -c 1) = /
- set upstream (echo $svn_upstream | cut -c 2-)
- else
- set upstream $svn_upstream
- end
+ set upstream (/bin/sh -c 'val=${1#/branches}; echo "${val#/}"' -- $svn_upstream)
set -l fetch_val (git config "$cur_prefix".fetch)
if test -n "$fetch_val"
set -l IFS :