diff --git a/scripts/rev.php b/scripts/rev.php index bd4963d..31d5eba 100644 --- a/scripts/rev.php +++ b/scripts/rev.php @@ -432,11 +432,13 @@ function captureGitValues( & $output ) $hash = null; $date = null; $utct = new DateTimeZone( "UTC" ); + $skipThisCommit = false; while ( ( $line = fgets( $fp ) ) !== false ) { if ( substr( $line , 0 , 7 ) == "commit " ) { $hash = trim( substr( $line , 7 ) ); + $skipThisCommit = false; continue; } if ( strpos( $line , 'Date:' ) === 0 ) @@ -447,12 +449,20 @@ function captureGitValues( & $output ) if ( trim( $line ) == "" ) continue; if ( substr( $line , 0 , 4 ) == ' ' ) + { + if ( stristr( $line, '[skip-revcheck]' ) !== false ) + { + $skipThisCommit = true; + } continue; + } if ( strpos( $line , ': ' ) > 0 ) continue; $filename = trim( $line ); if ( isset( $output[$filename] ) ) continue; + if ( $skipThisCommit ) + continue; $output[$filename]['hash'] = $hash; } pclose( $fp );