Fixes error on freshly initialized repository

master
Martin Gondermann 10 years ago
parent 1b31e33d93
commit 1603b30f71
  1. 2
      gitstatus.sh

@ -56,7 +56,7 @@ remote=
if [[ "$branch" == *"Initial commit on"* ]]; then if [[ "$branch" == *"Initial commit on"* ]]; then
IFS=" " read -ra branch_line <<< "$branch" IFS=" " read -ra branch_line <<< "$branch"
branch=${branch_line[-1]} branch="${branch_line[3]}"
remote="_NO_REMOTE_TRACKING_" remote="_NO_REMOTE_TRACKING_"
elif [[ "$branch" == *"no branch"* ]]; then elif [[ "$branch" == *"no branch"* ]]; then
tag=$( git describe --exact-match ) tag=$( git describe --exact-match )

Loading…
Cancel
Save