[PATCH 5/10] Move printing of the commit info line inside the loop
Printing of all the log headers are now handled the same place.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
cg-log | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cg-log b/cg-log
--- a/cg-log
+++ b/cg-log
@@ -176,7 +176,6 @@ $revls | $revsort | while read time comm
if [ "$user" ]; then
git-cat-file commit $commit | grep -e '^author ' -e '^committer ' | grep -qi "$user" || continue
fi
- echo $colheader""commit ${commit%:*} $coldefault;
git-cat-file commit $commit | \
while read key rest; do
trap exit SIGPIPE
@@ -194,6 +193,7 @@ $revls | $revsort | while read time comm
parents[${#parents[@]}]="$rest"
;;
"")
+ echo ${colheader}commit ${commit%:*} $coldefault
echo ${colheader}tree $tree $coldefault
for parent in "${parents[@]}"; do
--
Jonas Fonseca