From 59e806f20abcca4c34e2a0138bd3dc297c48fb8b Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 17 Jun 2017 20:22:38 -0700 Subject: [PATCH] tg-summary: show annihilated with -v -v -l Doubling up the verbosity gets annihilated branches to show up in a --list (aka -l, -t, --terse) output listing. Since the only way to tell the annihilated branches apart is via the "(annihilated)" at the end of the synthesized message it makes sense to only allow this as an extension of formats that include the branch message in the output. First up is the --list format and here it is. Signed-off-by: Kyle J. McKay --- README | 1 + tg-summary.sh | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README b/README index 677899b..7e8c3c2 100644 --- a/README +++ b/README @@ -1239,6 +1239,7 @@ tg summary relevant information about each branch; you can pass ``-t`` (or ``-l`` or ``--list``) to get just a terse list of topic branch names quickly. Also adding ``--verbose`` (or ``-v``) includes the subjects too. + Adding a second ``--verbose`` includes annihilated branches as well. Passing ``--heads`` shows independent topic branch names and when combined with ``--rdeps`` behaves as though ``--rdeps`` were run with diff --git a/tg-summary.sh b/tg-summary.sh index e7c37f1..277f2e9 100644 --- a/tg-summary.sh +++ b/tg-summary.sh @@ -40,7 +40,7 @@ while [ -n "$1" ]; do -t|--list|-l|--terse) terse=1;; -v|--verbose) - verbose=1;; + verbose=$(( $verbose + 1 ));; --heads|--topgit-heads) heads=1 headsindep=;; @@ -374,7 +374,8 @@ if [ -n "$terse" ]; then [ -z "$tg_read_only" ] || [ -z "$tg_ref_cache" ] || ! [ -s "$tg_ref_cache" ] || refslist="-r=\"$tg_ref_cache\"" cmd="run_awk_topgit_msg --list" - [ "${verbose:-0}" != "0" ] || cmd="run_awk_topgit_branches -n" + [ $verbose -lt 2 ] || cmd="run_awk_topgit_msg -c -nokind" + [ $verbose -gt 0 ] || cmd="run_awk_topgit_branches -n" eval "$cmd" "$refslist" '-i="$branches" -x="$exclude" "refs/$topbases"' exit 0 fi -- 2.11.4.GIT