Meta/ML: correctly detect topic that is not in 'master'

Junio C Hamano committed Jul 11, 2024 at 14:14 UTC 47e36b3df75a7adc105f7349a7675b0abf2db9df
1 file changed +6 -2
ML
+6 -2
@@ -35,7 +35,7 @@ search_topics () {
35 continue
36 fi
37
38 - ago= lg=0
38 + ago= lg=-1
39 fp=$(
40 sed -ne "s/^\($x40\) $x40 $tip"'$/\1/p' "$tmp"
41 ) &&
@@ -44,7 +44,11 @@ search_topics () {
44 git show -s --format='%ad' --date=short $fp
45 ) &&
46 lg=$(git log --oneline $target..$tip | wc -l)
47 - if test $lg != 0
47 +
48 + if test $lg = -1
49 + then
50 + echo "# $topic not yet merged to $here"
51 + elif test $lg != 0
52 then
53 echo "$topic # $lg${ago+ ($ago)}${comment+ $comment}"
54 else