chiark / gitweb /
tg-summary.sh: Add a 0 column denoting branch emptiness
authorPetr Baudis <pasky@suse.cz>
Sun, 3 Aug 2008 02:21:01 +0000 (04:21 +0200)
committerPetr Baudis <pasky@suse.cz>
Sun, 3 Aug 2008 02:21:01 +0000 (04:21 +0200)
README
tg-summary.sh

diff --git a/README b/README
index 848e3d2..79eb99d 100644 (file)
--- a/README
+++ b/README
@@ -255,8 +255,9 @@ tg patch
 tg summary
 ~~~~~~~~~~
        Show overview of all TopGit-tracked topic branches and their
-       up-to-date status ('D' marks that it is out-of-date wrt. its
-       dependencies, 'B' marks that it is out-of-date wrt. its base).
+       up-to-date status ('0' marks that it introduces no own changes,
+       'D' marks that it is out-of-date wrt. its dependencies,
+       'B' marks that it is out-of-date wrt. its base).
 
 tg update
 ~~~~~~~~~
index 9b44aa5..55e9764 100644 (file)
@@ -18,6 +18,8 @@ git for-each-ref refs/top-bases |
        while read rev name ref; do
                name="${ref#refs/top-bases/}"
 
+               nonempty=
+               ! branch_empty "$name" || nonempty='0'
                deps_update=' '
                [ -z "$(needs_update "$name")" ] || deps_update='D'
                base_update=' '
@@ -30,5 +32,6 @@ git for-each-ref refs/top-bases |
                        subject="(No commits)"
                fi
 
-               printf '%s%s\t%-31s\t%s\n' "$deps_update" "$base_update" "$name" "$subject"
+               printf '%s%s%s\t%-31s\t%s\n' "$nonempty" "$deps_update" "$base_update" \
+                       "$name" "$subject"
        done