]> Sergey Matveev's repositories - schwabrak.git/blob - comment-list
Dependency must be with subdirectories
[schwabrak.git] / comment-list
1 #!/usr/bin/env zsh
2
3 root=$0:h:a
4 . $root/lib.zsh.rc
5
6 [[ -n $NO_COLOR ]] || coloured_git=--color
7
8 issue=${1#issues/}
9 hashes=(`git log --format=format:%H issues/$issue/comment`)
10 for i ({${#hashes}..1}) {
11     comment=`git cat-file blob ${hashes[$i]}:issues/$issue/comment | sed "s/^/+ /"`
12     [[ -n $comment ]] || continue
13     header=`git show $coloured_git --no-patch --format=format:"%CgreenWhen: %ai%Creset%n%CredAuthor: %an <%ae>%Creset%n%CblueComment:%Creset" ${hashes[$i]}`
14     print $header
15     print $comment
16     [[ $i -eq 1 ]] || print
17 }