chiark
/
gitweb
/
~ian
/
topgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b7ec06
)
tg summary -t: Very quick mode, only branch names
author
Petr Baudis
<pasky@suse.cz>
Thu, 25 Sep 2008 14:55:09 +0000
(16:55 +0200)
committer
Petr Baudis
<pasky@suse.cz>
Thu, 25 Sep 2008 14:55:09 +0000
(16:55 +0200)
README
patch
|
blob
|
history
tg-summary.sh
patch
|
blob
|
history
diff --git
a/README
b/README
index 2cfad59048bece61b5d9de37b127d0414d562ba1..8a68a652bd493c8397410362d98bcf58750dcb12 100644
(file)
--- a/
README
+++ b/
README
@@
-329,6
+329,10
@@
tg summary
'!' marks that it has missing dependencies (even recursively),
'B' marks that it is out-of-date wrt. its base).
'!' marks that it has missing dependencies (even recursively),
'B' marks that it is out-of-date wrt. its base).
+ This can take long time to accurately determine all the relevant
+ information about each branch; you can pass '-t' to get just
+ terse list of topic branch names quickly.
+
TODO: Speed up by an order of magnitude
TODO: Graph view
TODO: Speed up by an order of magnitude
TODO: Graph view
diff --git
a/tg-summary.sh
b/tg-summary.sh
index 409f45622910caf29b5f6d68a2930b3f76b6a274..3905bdce7dc1d934a7862c025c4fb772c52660d6 100644
(file)
--- a/
tg-summary.sh
+++ b/
tg-summary.sh
@@
-3,13
+3,21
@@
# (c) Petr Baudis <pasky@suse.cz> 2008
# GPLv2
# (c) Petr Baudis <pasky@suse.cz> 2008
# GPLv2
+terse=
+
## Parse options
## Parse options
-if [ -n "$1" ]; then
- echo "Usage: tg [...] summary" >&2
- exit 1
-fi
+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -t)
+ terse=1;;
+ *)
+ echo "Usage: tg [...] summary [-t]" >&2
+ exit 1;;
+ esac
+done
curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
@@
-19,6
+27,11
@@
curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
git for-each-ref refs/top-bases |
while read rev type ref; do
name="${ref#refs/top-bases/}"
git for-each-ref refs/top-bases |
while read rev type ref; do
name="${ref#refs/top-bases/}"
+ if [ -n "$terse" ]; then
+ echo "$name"
+ continue
+ fi
+
missing_deps=
current=' '
missing_deps=
current=' '