[binutils-gdb] [pre-commit] Use pass_filenames=false for pre-commit-setup
Tom de Vries
vries@sourceware.org
Tue Jun 16 22:36:21 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9d73c03110820927122c08deb7e467f418848088
commit 9d73c03110820927122c08deb7e467f418848088
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Jun 17 00:36:17 2026 +0200
[pre-commit] Use pass_filenames=false for pre-commit-setup
I came across pre-commit setting pass_filenames, and realized we can use it
for the pre-commit-setup hook.
It saves about half a second for an all-files run. Before:
...
$ ( time pre-commit run pre-commit-setup --all-files ) 2>&1 | grep real
real 0m1,136s
...
and after:
...
$ ( time pre-commit run pre-commit-setup --all-files ) 2>&1 | grep real
real 0m0,635s
...
Diff:
---
.pre-commit-config.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 351b9f6933f..a5b526b1eec 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -112,6 +112,7 @@ repos:
additional_dependencies: ["pyyaml"]
always_run: true
require_serial: true
+ pass_filenames: false
- id: check-file-mode
name: check-file-mode
language: unsupported_script
More information about the Binutils-cvs
mailing list