Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14842027
D20431.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D20431.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20431: Show a warning when "git" is too old to support filesize limits
Attached
Detach File
Event Timeline
Log In to Comment