[TopGit PATCH] tg-info: pretty print dependencies

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: Bert Wesarg <bert.wesarg@...>, <git@...>
Date: Tuesday, August 5, 2008 - 7:19 am

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[TopGit PATCH] tg-info: pretty print dependencies, Bert Wesarg, (Tue Aug 5, 7:19 am)