// This is a git commit message, probably from "git show".
'(?P<type>commit) (?P<hash>[a-f0-9]+)',
// This is a git diff, probably from "git show" or "git diff".
- '(?P<type>diff --git) a/(?P<old>.+) b/(?P<cur>.+)',
+ '(?P<type>diff --git) [abicwo12]/(?P<old>.+) [abicwo12]/(?P<cur>.+)',
// This is a unified diff, probably from "diff -u" or synthetic diffing.
'(?P<type>---) (?P<old>.+)\s+\d{4}-\d{2}-\d{2}.*',
'(?P<binary>Binary) files '.
$this->assertEqual(0, count($change->getHunks()));
}
break;
+ case 'git-mnemonicprefix.gitdiff':
+ // Check parsing of diffs created with `diff.mnemonicprefix`
+ // configuration option set to `true`.
+ $this->assertEqual(1, count($changes));
+ $this->assertEqual(1, count(reset($changes)->getHunks()));
+ break;
case 'git-commit.gitdiff':
$this->assertEqual(1, count($changes));
$change = reset($changes);