* [TopGit PATCH] tg-info: pretty print dependencies
@ 2008-08-05 11:19 Bert Wesarg
0 siblings, 0 replies; only message in thread
From: Bert Wesarg @ 2008-08-05 11:19 UTC (permalink / raw)
To: Petr Baudis; +Cc: Bert Wesarg, git
Print one dependency per line in tg-info output.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
tg-info.sh | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tg-info.sh b/tg-info.sh
index ce99809..9e09039 100644
--- a/tg-info.sh
+++ b/tg-info.sh
@@ -38,8 +38,13 @@ echo "Base: $base_rev"
branch_contains "$name" "$base_rev" ||
echo "Base is newer than head! Please run \`tg update\`."
-deps="$(git cat-file blob "$name:.topdeps")"
-echo "Depends: $deps"
+prefix="Depends:"
+prefixlen=${#prefix}
+git cat-file blob "$name:.topdeps" 2>/dev/null |
+ while read _dep; do
+ printf "%-*s %s\n" $prefixlen "$prefix" "$_dep"
+ prefix=""
+ done
depcheck="$(mktemp)"
needs_update "$name" >"$depcheck"
--
1.5.5.GIT
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-05 11:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 11:19 [TopGit PATCH] tg-info: pretty print dependencies Bert Wesarg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).