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 848e3d225425fa34a22d5d8a526f06731c4ebd40..79eb99dff7f1cf429c30cdbf67b675c7a6d72653 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 9b44aa52bbb78e99a691ac11993accce0095f1ef..55e9764001ea23c82f38eb0f3f1f1813cdedbf0a 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