[TopGit PATCH] tg-info: pretty print dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Print one dependency per line in tg-info output.

Signed-off-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux