Skip to content

LogCommand doesn't use jgit bloom filters when filtering paths #219

@nicolasdalsass

Description

@nicolasdalsass

Description

LogCommand doesn't use bloom filters when filtering path : LogCommand.addPath() creates a simple PathFilter instead of a ChangedPathTreeFilter which can be much more efficient if the repo uses bloom filters.

Motivation

It would make jgit log /path/to/file a lot faster for correctly configured big repos (for us, it's one order of magnitude faster).

Alternatives considered

The current workaround for us is accessing the private field LogCommand::excludeTreeFilters through reflection, and call excludeTreeFilters.add(ChangedPathTreeFilter.create(paths.toArray(new String[0]))); to filter on the paths of interest. This works, but is quite ugly.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions