mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
No description
d0957c3441
Summary: The previous parser failed when only one of the old/new filenames was quoted, as with a rename of a Unicode filename to a non-Unicode filename, or vice versa. It also incorrectly parsed custom prefixes, even going to far as to encode this logic in the tests: a diff of "src/file dst/file" which is not a rename should not be recorded as changing "src/file", but rather "file". Switch to using the "rename from" / "rename to" as the source of truth for old and current filenames when complex renames are done. This matches the logic that git itself uses to parse patches; the contents of the `diff --git` line are merely viewed as a simplest-case prediction, with renames handled later should it not match. The diff parser already had logic to parse "rename from" / "rename to" lines and extract their information. As such, this diff consists primarily of removing logic from the `splitGitDiffPaths` method, and allowing it to quietly fail. This resolves two ambiguity mentioned in comments and tests: in renaming "old file old" to "file", as well as the renaming of "old file with spaces" to "new file with spaces" when neither are quoted. Test Plan: `arc unit`. Many of the existing test cases no longer applied to the `splitGitDiffPaths` method; they were moved into a new test method which also supplies values for "rename from" and "rename to" lines. As noted in the summary, this alters one of the expected values of an existing test. Specifically, the following diff is a file addition of `file` with custom prefixes, and not the addition of "dst/file": ``` diff --git src/file dst/file new file mode 100644 index 0000000..1269488 --- /dev/null +++ dst/file @@ -0,0 +1 @@ +data ``` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D16405 |
||
---|---|---|
bin | ||
externals | ||
resources | ||
scripts | ||
src | ||
.arcconfig | ||
.arclint | ||
.arcunit | ||
.editorconfig | ||
.gitignore | ||
LICENSE | ||
NOTICE | ||
README.md |
Arcanist is the command-line tool for Phabricator. It allows you to interact with Phabricator installs to send code for review, download patches, transfer files, view status, make API calls, and various other things. You can read more in the User Guide
For more information about Phabricator, see http://phabricator.org/.
LICENSE
Arcanist is released under the Apache 2.0 license except as otherwise noted.