Page MenuHomePhabricator

D20431.diff
No OneTemporary

D20431.diff

diff --git a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
--- a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
+++ b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
@@ -236,6 +236,22 @@
'you can set a path in **Import Only**. Phabricator will ignore '.
'commits which do not affect this path.');
+ $filesize_warning = null;
+ if ($object->isGit()) {
+ $git_binary = PhutilBinaryAnalyzer::getForBinary('git');
+ $git_version = $git_binary->getBinaryVersion();
+ $filesize_version = '1.8.4';
+ if (version_compare($git_version, $filesize_version, '<')) {
+ $filesize_warning = pht(
+ '(WARNING) {icon exclamation-triangle} The version of "git" ("%s") '.
+ 'installed on this server does not support '.
+ '"--batch-check=<format>", a feature required to enforce filesize '.
+ 'limits. Upgrade to "git" %s or newer to use this feature.',
+ $git_version,
+ $filesize_version);
+ }
+ }
+
return array(
id(new PhabricatorSelectEditField())
->setKey('vcs')
@@ -477,6 +493,7 @@
->setDescription(pht('Maximum permitted file size.'))
->setConduitDescription(pht('Change the filesize limit.'))
->setConduitTypeDescription(pht('New repository filesize limit.'))
+ ->setControlInstructions($filesize_warning)
->setValue($object->getFilesizeLimit()),
id(new PhabricatorTextEditField())
->setKey('copyTimeLimit')

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 2, 8:23 PM (7 h, 35 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7085190
Default Alt Text
D20431.diff (1 KB)

Event Timeline