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

Raise a better error for malformed `git ls-tree`

Summary: Ref T4159. See T4159 for discussion.

Test Plan: Faked the error and generated a reasonable error message.

Reviewers: hach-que, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4159

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

+9
+9
src/applications/diffusion/conduit/ConduitAPI_diffusion_browsequery_Method.php
··· 100 100 101 101 $results = array(); 102 102 foreach (explode("\0", rtrim($stdout)) as $line) { 103 + if (substr_count($line, ' ') < 4) { 104 + throw new Exception( 105 + pht( 106 + 'Expected "<mode> <type> <hash> <size> <name>", for ls-tree of '. 107 + '"%s:%s", got: %s', 108 + $commit, 109 + $path, 110 + $line)); 111 + } 103 112 104 113 // NOTE: Limit to 5 components so we parse filenames with spaces in them 105 114 // correctly.