diff --git a/tools/build/missing-commits.pl6 b/tools/build/missing-commits.pl6 index 92e1eed0d1d..89bb6dc5454 100644 --- a/tools/build/missing-commits.pl6 +++ b/tools/build/missing-commits.pl6 @@ -5,23 +5,21 @@ sub commit($line) { $line.starts-with('commit ') ?? $line.substr(7,8) !! Nil } # The commit that did the last VERSION bump my $version-bump-commit = commit( qx/git log -- VERSION/.lines.head ); -# Make a SetHash with all of the commits since the last VERSION bump -my %commits is SetHash = qx/git log/.lines.map( { +# Make a Set with all of the commits since the last VERSION bump minus +# all the commits that have been documented in ChangeLog since the last +# bump. Note that we assume that an empty line indicates the boundary +# between releases. +my $missing = qx/git log/.lines.map( { if commit($_) -> \commit { last if commit eq $version-bump-commit; commit } -} ); - -# Remove the commits that have been documented in ChangeLog since bump -# Note that we assume here that an empty line indicates boundary between -# releases. -%commits{ "docs/ChangeLog".IO.lines.map( { +} ) (-) "docs/ChangeLog".IO.lines.map: { $_ ?? |.comb( / ( <[ 0..9 a..f A..F ]> ** 8 ) / ) !! last -} ) }:delete; +} # Let the world know the result -say "%commits.elems() commits not yet documented in ChangeLog:"; -%commits.keys.sort.batch(9).map: *.Str.say; +say "$missing.elems() commits not yet documented in ChangeLog:"; +$missing.keys.sort.batch(9).map: *.Str.say;