Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Search backend: add structured diff to CommitMatch result#39383

Merged
camdencheek merged 2 commits into
mainfrom
cc/structured-diffs
Jul 27, 2022
Merged

Search backend: add structured diff to CommitMatch result#39383
camdencheek merged 2 commits into
mainfrom
cc/structured-diffs

Conversation

@camdencheek

@camdencheek camdencheek commented Jul 25, 2022

Copy link
Copy Markdown
Member

This just constructs CommitMatch with an additional field that is the structured form of the diff rather than the textual form. The text form and structural form can be converted into each other without any loss of information, so in time, we should be able to remove the textual diff from the result type.

I want this available for file:contains() on diff searches, which is why I'm spending a little time on this now.

Test plan

Updated existing tests. Things that are worth adding tests for were added in previous PRs.

@cla-bot cla-bot Bot added the cla-signed label Jul 25, 2022
@sourcegraph-bot

sourcegraph-bot commented Jul 25, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff fc15e8f...ee0908d.

Notify File(s)
@beyang internal/search/commit/commit.go
internal/search/result/commit.go
internal/search/result/commit_json.go
internal/search/result/commit_json_test.go
@keegancsmith internal/search/commit/commit.go
internal/search/result/commit.go
internal/search/result/commit_json.go
internal/search/result/commit_json_test.go

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants