Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Added support to branxhes for detached head
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybatch committed Feb 21, 2017
1 parent 0d1f35a commit fcefe84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions branches
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ if [ -z "$plainoutput" ]; then
fi

if [ ! -z "$latesttag" ]; then
printf "${COL_GREEN}%-25s %-20s %-10s %s${COL_RESET}\n" Name Branch Tag Path
printf "${COL_GREEN}%-20s %-25s %-10s %s${COL_RESET}\n" Name Branch Tag Path
else
printf "${COL_GREEN}%-25s %-20s %s${COL_RESET}\n" Name Branch Path
printf "${COL_GREEN}%-20s %-25s %s${COL_RESET}\n" Name Branch Path
fi

EXITSTATE=0
Expand Down Expand Up @@ -81,9 +81,9 @@ for var in "$ROOTPATH"; do
lt=`$GITCMD describe --abbrev=0 --tags 2> /dev/null`
diff=`$GITCMD diff refs/heads/${branch}..refs/tags/${lt} 2> /dev/null`
if [ ! -z "$diff" ]; then
printf "$COL_MAGENTA%-25s$COL_RESET %-20s $COL_RED%-10s$COL_RESET %s\n" $name $branch $lt $clean_dir
printf "$COL_MAGENTA%-20s$COL_RESET %-25s $COL_RED%-10s$COL_RESET %s\n" $name "$branch" $lt $clean_dir
else
printf "$COL_CYAN%-25s$COL_RESET %-20s %-10s %s\n" $name $branch $lt $clean_dir
printf "$COL_CYAN%-20s$COL_RESET %-25s %-10s %s\n" $name "$branch" $lt $clean_dir
fi
else
printf "%-25s %-20s %s\n" $name $branch $clean_dir
Expand Down

0 comments on commit fcefe84

Please sign in to comment.