Fixed git status is broken on branch name containing forward-slash.

master
Garry Yao 12 years ago
parent f1508c87c6
commit 521234f8c9
  1. 4
      gitstatus.sh

@ -56,7 +56,7 @@ if [[ -z "$branch" ]]; then
fi fi
else else
remote_name=`git config branch.${branch}.remote` remote_name=`git config branch.${branch}.remote`
if [[ -n "$remote_name" ]]; then if [[ -n "$remote_name" ]]; then
merge_name=`git config branch.${branch}.merge` merge_name=`git config branch.${branch}.merge`
else else
@ -67,7 +67,7 @@ else
if [[ "$remote_name" == '.' ]]; then if [[ "$remote_name" == '.' ]]; then
remote_ref="$merge_name" remote_ref="$merge_name"
else else
remote_ref="refs/remotes/$remote_name/${merge_name##*/}" remote_ref="refs/remotes/$remote_name/${merge_name##refs/heads/}"
fi fi
# get the revision list, and count the leading "<" and ">" # get the revision list, and count the leading "<" and ">"

Loading…
Cancel
Save