- commit="${commit:(-8)}"; # get last 8 chars
- # Prepend results with commit
- results="$( echo "$results" | sed "s/^/$commit: /" )";
- printf "%s\n" "$results";
+ # Get commit timestamp
+ time="$(git -c log.showSignature=false show -s --format=%cI "$commit")";
+
+ # Get last 8 chars of commit
+ short_commit="${commit:(-8)}";
+
+ # Output results
+ while read -r line; do
+ if [[ -z "$line" ]]; then continue; fi; # skip blank lines
+ printf "%s %s %s\n" "$time" "$short_commit" "$line";
+ done < <(printf "%s\n" "$results");