Skip to content

refactor: disjoint types for commit and text pattern info

Warren Gifford requested to merge rvt/disjoint-pattern-info-types into master

Created by: rvantonder

This splits thePatternInfo type in two:

            ,TextPatternInfo
           /
PatternInfo
           \
            `CommitPatternInfo

But they are identical in this PR, so this preserves all behavior. This includes duplication of pattern_info to commit_pattern_info.go and text_pattern_info.go. References to CommitPatternInfo and TextPatternInfo are set in search_results.go and propagated down.

Other uses of PatternInfo (for symbols) keeps using the TextPatternInfo type and I will deal with that later.

In the follow up PR #7541, I cut out the state of CommitPatternInfo that is unused, which is the first part of this exercise. In the future we can merge PatternInfo back again based on what is truly shared, but right now it's not possible to easily tell what is shared across all the search logic.

Merge request reports

Loading