@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't use "--" to separate flags and arguments in "git ls-remote"

Summary: Fixes T12416. See that task for discussion. Slightly older versions of `git` do not appear to support use of `--` to separate flags and arguments.

Test Plan:
- Ran `bin/repository update PHABX`.
- In T12416, had a user with Git 2.1.4 confirm that `git ls-remote X` worked while `git ls-remote -- X` failed.
- Read `git help ls-remote` to look for any kind of suspicious `--destroy-the-world` flags, didn't see any that made me uneasy.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T12416

Differential Revision: https://secure.phabricator.com/D17508

+4 -1
+4 -1
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
··· 392 392 private function loadGitRemoteRefs(PhabricatorRepository $repository) { 393 393 $remote_envelope = $repository->getRemoteURIEnvelope(); 394 394 395 + // NOTE: "git ls-remote" does not support "--" until circa January 2016. 396 + // See T12416. None of the flags to "ls-remote" appear dangerous, and 397 + // other checks make it difficult to configure a suspicious remote URI. 395 398 list($stdout) = $repository->execxRemoteCommand( 396 - 'ls-remote -- %P', 399 + 'ls-remote %P', 397 400 $remote_envelope); 398 401 399 402 $map = array();