tg summary
~~~~~~~~~~
Show overview of all TopGit-tracked topic branches and their
- up-to-date status ('0' marks that it introduces no own changes,
+ up-to-date status ('>' marks the current topic branch,
+ '0' marks that it introduces no own changes,
'l'/'r' marks that it is local-only or has remote mate,
'L'/'R' marks that it is ahead/out-of-date wrt. its remote mate,
'D' marks that it is out-of-date wrt. its dependencies,
exit 1
fi
+curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
+
## List branches
name="${ref#refs/top-bases/}"
missing_deps=
+ current=' '
+ [ "$name" != "$curname" ] || current='>'
nonempty=' '
! branch_empty "$name" || nonempty='0'
remote=' '
subject="(No commits)"
fi
- printf '%s\t%-31s\t%s\n' "$nonempty$remote$rem_update$deps_update$deps_missing$base_update" \
+ printf '%s\t%-31s\t%s\n' "$current$nonempty$remote$rem_update$deps_update$deps_missing$base_update" \
"$name" "$subject"
done