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

Show a warning when "git" is too old to support filesize limits

Summary: See <https://discourse.phabricator-community.org/t/git-push-failed-with-filesize-limit-on/2635/2>

Test Plan: {F6378519}

Reviewers: amckinley, avivey

Reviewed By: avivey

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

+17
+17
src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
··· 236 236 'you can set a path in **Import Only**. Phabricator will ignore '. 237 237 'commits which do not affect this path.'); 238 238 239 + $filesize_warning = null; 240 + if ($object->isGit()) { 241 + $git_binary = PhutilBinaryAnalyzer::getForBinary('git'); 242 + $git_version = $git_binary->getBinaryVersion(); 243 + $filesize_version = '1.8.4'; 244 + if (version_compare($git_version, $filesize_version, '<')) { 245 + $filesize_warning = pht( 246 + '(WARNING) {icon exclamation-triangle} The version of "git" ("%s") '. 247 + 'installed on this server does not support '. 248 + '"--batch-check=<format>", a feature required to enforce filesize '. 249 + 'limits. Upgrade to "git" %s or newer to use this feature.', 250 + $git_version, 251 + $filesize_version); 252 + } 253 + } 254 + 239 255 return array( 240 256 id(new PhabricatorSelectEditField()) 241 257 ->setKey('vcs') ··· 477 493 ->setDescription(pht('Maximum permitted file size.')) 478 494 ->setConduitDescription(pht('Change the filesize limit.')) 479 495 ->setConduitTypeDescription(pht('New repository filesize limit.')) 496 + ->setControlInstructions($filesize_warning) 480 497 ->setValue($object->getFilesizeLimit()), 481 498 id(new PhabricatorTextEditField()) 482 499 ->setKey('copyTimeLimit')