]> Sergey Matveev's repositories - schwabrak.git/commitdiff
Do not fail if no comment file exists
authorSergey Matveev <stargrave@stargrave.org>
Wed, 20 Mar 2024 09:59:13 +0000 (12:59 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 20 Mar 2024 09:59:13 +0000 (12:59 +0300)
comment-list

index c2a673cdc21446bc1b10d1d64d9c810a9f13cc1105084edba8122860e0fddc4e..1565bb8122b29b3bca7821972e2f1a92790dd94aa15cd17c9f046ea8820c32f2 100755 (executable)
@@ -6,6 +6,7 @@ root=$0:h:a
 [[ -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}) {
     comment=`git cat-file blob ${hashes[$i]}:issues/$issue/comment | sed "s/^/+ /"`