Merge pull request #196 from ogr3/simplified-old-status

Simplified old gitstatus
master
Martin Gondermann 10 years ago
commit 61606eb5f9
  1. 14
      gitstatus_pre-1.7.10.sh

@ -84,12 +84,6 @@ else
upstream=$( git rev-parse --abbrev-ref ${branch}@{upstream} 2>&1 ) upstream=$( git rev-parse --abbrev-ref ${branch}@{upstream} 2>&1 )
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
has_remote_tracking=1
else
has_remote_tracking=0
unset upstream
fi
# get the revision list, and count the leading "<" and ">" # get the revision list, and count the leading "<" and ">"
revgit=$( git rev-list --left-right ${remote_ref}...HEAD 2>/dev/null ) revgit=$( git rev-list --left-right ${remote_ref}...HEAD 2>/dev/null )
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
@ -103,16 +97,16 @@ else
remote="${remote}_AHEAD_${num_ahead}" remote="${remote}_AHEAD_${num_ahead}"
fi fi
fi fi
else
remote='_NO_REMOTE_TRACKING_'
unset upstream
fi
fi fi
if [[ -z "$remote" ]] ; then if [[ -z "$remote" ]] ; then
remote='.' remote='.'
fi fi
if [[ "$has_remote_tracking" == "0" ]] ; then
remote='_NO_REMOTE_TRACKING_'
fi
if [[ -z "$upstream" ]] ; then if [[ -z "$upstream" ]] ; then
upstream='^' upstream='^'
fi fi

Loading…
Cancel
Save