[Bug build/34410] New: [pre-commit] Don't call identify for each file

"vries at gcc dot gnu.org via Gdb-prs" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34410

            Bug ID: 34410
           Summary: [pre-commit] Don't call identify for each file
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Pre-commit hooks run on files that match both the files and types filters.

The files filter uses fields files and exclude.

The types filter uses fields types, types_or and types_exclude.

The default values for the types filter fields are:
- types: [file]
- types_or: []
- types_exclude: []

If we'd have types == [] and types_or == [], there would be no need for
pre-commit to run identify on each matching file.  Currently pre-commit doesn't
have this optimization, but it doesn't seem difficult to implement in
Classifier.by_types.

The file type classification done by identify is file/symlink/directory/socket,
so the question is whether dropping the file requirement introduces any real
regressions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.