Support following single-file history across renames in GraphQL API#45882
Conversation
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 990e3be...564a35e.
|
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 8b56a9e and 990e3be or learn more. Open explanation
|
sashaostrikov
left a comment
There was a problem hiding this comment.
LGTM, except panicking, left a comment about that
philipp-spiess
left a comment
There was a problem hiding this comment.
Nice improvement! Let's remove the panic and ![]()
a845ff2 to
8b56a9e
Compare
|
This actually needs more work. The reason is that in the panel, the file icon (pictured below) needs to link to the previous filename, not the current filename. That means we need to track the filename over history and pass it back via the API, which means we need something different than just a general GitCommitConnection (like a FileHistory type or FileCommitConnection type). I am going to merge this PR with just the new GraphQL API (which is semi-valuable by itself) and leave the issue for the UI functionality open (pending the addition of that FileHistory/FileCommitConnection type). |
8b56a9e to
ba355fd
Compare
ba355fd to
564a35e
Compare

Adds
GitCommit.ancestors(follow: Boolean)to the GraphQL API to track a single file's commit history across renames.Helps with #4383. See https://github.com/sourcegraph/sourcegraph/pull/45882#issuecomment-1364482590 for the additional backend, API, and UI work needed to close that issue.
Test plan
Call
ancestorsin the GraphQL API with apathandfollow: true. Ensure it shows commits before a rename.