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

Make "git cat-file" exception messages include repository monogram/slug

Summary:
When throwing an exception related to output provided by `git cat-file`, include the repository monogram to allow potentially debugging in Git.

Closes T15661

Test Plan:
Unclear. Basically: "have a broken Git repository in Diffusion".
(However this patch changes a message only shown in case of an exception, so in the worst case we'd break the exception via an exception.)

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15661

Differential Revision: https://we.phorge.it/D25460

+7 -4
+7 -4
src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
··· 140 140 if (count($lines) !== count($unresolved)) { 141 141 throw new Exception( 142 142 pht( 143 - 'Unexpected line count from `%s`!', 144 - 'git cat-file')); 143 + 'Unexpected line count from `%s` in %s!', 144 + 'git cat-file', 145 + $repository->getMonogram())); 145 146 } 146 147 147 148 $hits = array(); ··· 153 154 if (count($parts) < 2) { 154 155 throw new Exception( 155 156 pht( 156 - 'Failed to parse `%s` output: %s', 157 + 'Failed to parse `%s` output in %s: %s', 157 158 'git cat-file', 159 + $repository->getMonogram(), 158 160 $line)); 159 161 } 160 162 list($identifier, $type) = $parts; ··· 177 179 default: 178 180 throw new Exception( 179 181 pht( 180 - 'Unexpected object type from `%s`: %s', 182 + 'Unexpected object type from `%s` in %s: %s', 181 183 'git cat-file', 184 + $repository->getMonogram(), 182 185 $line)); 183 186 } 184 187