@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.

Throw CommandException instead of Exception after `git fetch` failure in repository updates

Summary: Fixes T9966. In this unusual, difficult-to-reach case, we throw `Exception` (which has no censoring) instead of `CommandException` (which has censoring). Throw `CommandException` instead.

Test Plan:
- Hacked up a bunch of stuff in order to hit this: disabled origin validation, origin correction, and pointed repository at a bad domain.
- Verified message is now censored correctly.

{F1022217}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9966

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

+6 -6
+6 -6
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
··· 334 334 $remote_uri); 335 335 } 336 336 } else if ($err) { 337 - throw new Exception( 338 - pht( 339 - "git fetch failed with error #%d:\nstdout:%s\n\nstderr:%s\n", 340 - $err, 341 - $stdout, 342 - $stderr)); 337 + throw new CommandException( 338 + pht('Failed to fetch changes!'), 339 + $future->getCommand(), 340 + $err, 341 + $stdout, 342 + $stderr); 343 343 } else { 344 344 $retry = false; 345 345 }