root=$0:h:a
. $root/lib.zsh.rc
+[[ -n $NO_COLOR ]] || coloured_git=--color
+
issue=${1#issues/}
+[[ -e issues/$issue/comment ]] || exit 0
hashes=(`git log --format=format:%H issues/$issue/comment`)
for i ({${#hashes}..1}) {
- header=`git show --no-patch --format=format:"When: %ai%nAuthor: %an <%ae>" ${hashes[$i]}`
comment=`git cat-file blob ${hashes[$i]}:issues/$issue/comment | sed "s/^/+ /"`
[[ -n $comment ]] || continue
+ header=`git show $coloured_git --no-patch --format=format:"%CgreenWhen: %ai%Creset%n%CredAuthor: %an <%ae>%Creset%n%CblueComment:%Creset" ${hashes[$i]}`
print $header
- print Comment:
print $comment
[[ $i -eq 1 ]] || print
}