Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed] [pre-commit] Use pass_filenames=false for pre-commit-setup
@ 2026-06-16 22:36 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-06-16 22:36 UTC (permalink / raw)
  To: gdb-patches

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

base-commit: 60466ce68ac1a2d93c7f39b2638e24f48125fbf9
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-16 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-16 22:36 [pushed] [pre-commit] Use pass_filenames=false for pre-commit-setup Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox