Skip to content

Commit

Permalink
Add asterisk after name of current branch. #109
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffroy-aubry committed Oct 16, 2013
1 parent 91a5f06 commit 53bc82b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions conf/twgit-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ declare -A CUI_COLORS=(
[warning]='\033[0;33m'
[warning.bold]='\033[1;33m'
[warning.header]='\033[1m\033[4;33m/!\\\033[0;37m '
[current_branch]='\033[1;31m'
)
16 changes: 7 additions & 9 deletions inc/common.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1109,17 +1109,15 @@ function display_branches () {
else
local prefix="$TWGIT_ORIGIN/$TWGIT_PREFIX_FEATURE"
local add_empty_line=0
local stable_origin
for branch in $branches; do
local branch_short="${branch#$TWGIT_ORIGIN/}"

if ! isset_option 'c'; then
[ "$add_empty_line" = "0" ] && add_empty_line=1 || echo
fi
local stable_origin="$(git describe --abbrev=0 "$branch" 2>/dev/null)"
if [ "$current_branch" == "$branch_short" ]; then
echo -n $(CUI_displayMsg ok "*==> ")
fi

echo -n $(CUI_displayMsg info "${titles[$type]}$branch")
[ "$current_branch" == "${branch#$TWGIT_ORIGIN/}" ] && echo -n $(CUI_displayMsg current_branch '*')
stable_origin="$(git describe --abbrev=0 "$branch" 2>/dev/null)"
echo -n $(CUI_displayMsg help_detail " (from <b>$stable_origin</b>) ")

[ "$type" = "feature" ] && displayFeatureSubject "${branch:${#prefix}}" || echo
Expand Down Expand Up @@ -1476,9 +1474,9 @@ function displayChangelogSection () {
content="## Version $(echo "${content#*## Version }")";
content="$(echo "${content%## Version ${from_tag:1}*}")";
content="$(echo -e "$content\n" \
| sedRegexpExtended ':a;N;$!ba;s/\n\n( -|```)/\n\1/g' \
| sedRegexpExtended 's/ - \[#([0-9]+)\]\([^)]+\)/ - #\1/' \
)";
| sedRegexpExtended ':a;N;$!ba;s/\n\n( -|```)/\n\1/g' \
| sedRegexpExtended 's/ - \[#([0-9]+)\]\([^)]+\)/ - #\1/' \
)";
local line
while read line; do
Expand Down

0 comments on commit 53bc82b

Please sign in to comment.