]> khamidou — GitHub mirrors - arcanist.git/commit
Make parser more flexible in the face of Git diff prefix flags
authorepriestley <git@epriestley.com>
Fri, 19 Oct 2012 21:07:34 +0000 (14:07 -0700)
committerepriestley <git@epriestley.com>
Fri, 19 Oct 2012 21:07:34 +0000 (14:07 -0700)
commitf1bca1b7cbe880cae565413bb8fa94123e8556b9
tree25b76087efa850d7b68f9a396da689146f9f52f6
parent4fb2b48d0697b680b634dfe46c35e3e1a571d19a
Make parser more flexible in the face of Git diff prefix flags

Summary: See T1675 for discussion. We currently strip `[abicwo12]/` from Git patches, but the user can provide arbitrary prefixes with `--src-prefix` and `--dst-prefix`, or strip prefixes entirely with `--no-prefix`. In these cases, trust they know what they're doing rather than rejecting the diff.

Test Plan: Added a bunch of tests. We have existing tests for `diff.mnemonicprefix` and normal prefixes.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T1675

Differential Revision: https://secure.phabricator.com/D3744
src/parser/ArcanistDiffParser.php
src/parser/__tests__/ArcanistDiffParserTestCase.php
src/parser/__tests__/diff/custom-prefixes.gitdiff [new file with mode: 0644]