Open courier-new opened 2 years ago
P0 or P1, depending on how bad https://github.com/sourcegraph/sourcegraph/issues/39194 is? Estimating this is a bit hard since compute will be new to all of us (we at least can look at replace
itself to get started) so let's be flexible here: 2d to 6d??
I vote P0 for the overall tracking issue, let's discuss what's the best ordering :)
Updating the estimate on this given Bolaji has a working solution for generating the diffs and just needs to figure out where it should live. 🎉
Currently, the compute
replace
command only outputs the changed file contents.For search-and-replace batch changes, we would like to implement support for an alternative output of the file diff when a new command,
replace.diff(...)
, is used. This will enable us to leverage this command for the UI previews andChangesetSpec
. We should ensure we're not creating 2 requests to gitserver for the same file this way.There are currently 3 types of Compute result:
Text
,TextExtra
, andMatchContext
.replace.diff(...)
should output a 4th type of result likeReplaceDiff
that also contains all the necessary context about where the diff was generated:This issue has as a prerequisite that we are able to generate patches in Go without calling out to
git diff
(https://github.com/sourcegraph/sourcegraph/issues/39194).