1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-04 02:48:24 +01:00
phorge-arcanist/src/repository
Alex Vandiver ad3087e5e1 Correctly parse git status --porcelain=2 output with filenames with spaces
Summary:
Filenames are last in `git status --porcelain=2` lines; they
are not escaped in any way, despite the fields being
whitespace-delimited.  `explode` thus happily chops apart filenames
with spaces in them, causing later git operations to operate only on
the filename up to the first space.

Split the lines into the right number of elements -- in all cases,
this is one more than the index we're using, since filenames come last.

Test Plan:
Altering a file with a space in its path, and running `arc diff -a`.

Added tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D19389
2018-04-19 19:17:16 -07:00
..
api Correctly parse git status --porcelain=2 output with filenames with spaces 2018-04-19 19:17:16 -07:00
parser Survive extra "obsolete:" log output from the Mercurial evolve extension 2018-03-26 14:12:15 -07:00