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:
cb7fbe7
)
tg summary: Mark current branch with '>'
author
Petr Baudis
<pasky@suse.cz>
Tue, 9 Sep 2008 19:55:55 +0000
(21:55 +0200)
committer
Petr Baudis
<pasky@suse.cz>
Tue, 9 Sep 2008 19:55:55 +0000
(21:55 +0200)
README
patch
|
blob
|
history
tg-summary.sh
patch
|
blob
|
history
diff --git
a/README
b/README
index 9df3699d765e8242b4b5f24075aa6d500b3753f1..4d96dfb5a52ebfc0cf40264f317ecd57f12865bf 100644
(file)
--- a/
README
+++ b/
README
@@
-266,7
+266,8
@@
tg remote
tg summary
~~~~~~~~~~
Show overview of all TopGit-tracked topic branches and their
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,
'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,
diff --git
a/tg-summary.sh
b/tg-summary.sh
index 8616d074dc6f392f9ec1df1533339bfa6ffdc021..bb71971aad2055c2d7d8388e59b4091dd9650256 100644
(file)
--- a/
tg-summary.sh
+++ b/
tg-summary.sh
@@
-11,6
+11,8
@@
if [ -n "$1" ]; then
exit 1
fi
exit 1
fi
+curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
+
## List branches
## List branches
@@
-19,6
+21,8
@@
git for-each-ref refs/top-bases |
name="${ref#refs/top-bases/}"
missing_deps=
name="${ref#refs/top-bases/}"
missing_deps=
+ current=' '
+ [ "$name" != "$curname" ] || current='>'
nonempty=' '
! branch_empty "$name" || nonempty='0'
remote=' '
nonempty=' '
! branch_empty "$name" || nonempty='0'
remote=' '
@@
-45,6
+49,6
@@
git for-each-ref refs/top-bases |
subject="(No commits)"
fi
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
"$name" "$subject"
done