Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13998835
D8981.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
980 B
Referenced Files
None
Subscribers
None
D8981.diff
View Options
diff --git a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
--- a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
+++ b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
@@ -637,9 +637,19 @@
foreach (Filesystem::listDirectory($directory) as $path) {
$full_path = $directory.DIRECTORY_SEPARATOR.$path;
- if (is_executable($full_path)) {
- $executables[] = $full_path;
+ if (!is_executable($full_path)) {
+ // Don't include non-executable files.
+ continue;
}
+
+ if (basename($full_path) == 'README') {
+ // Don't include README, even if it is marked as executable. It almost
+ // certainly got caught in the crossfire of a sweeping `chmod`, since
+ // users do this with some frequency.
+ continue;
+ }
+
+ $executables[] = $full_path;
}
return $executables;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 11:26 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6709924
Default Alt Text
D8981.diff (980 B)
Attached To
Mode
D8981: Never try to run README as a commit hook
Attached
Detach File
Event Timeline
Log In to Comment