private function isHeaderOpLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^(old|new|deleted|rename|copy) (file mode|from|to) (.+)#', $line, $matches)) {
            $this->currentOperation = self::$opsMap[$matches[1]];
            return true;
        }
        return false;
    }