Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new functionaltiy for reversing diffs. #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vslashg
Copy link

@vslashg vslashg commented Sep 20, 2024

ReverseFileDiff() and ReverseMultiFileDiff() accept a diff and return a diff which is the reverse operation -- that is, a diff that when applied would undo the edits of the original diff.

ReverseFileDiff() and ReverseMultiFileDiff() accept a diff and return
a diff which is the reverse operation -- that is, a diff that when
applied would undo the edits of the original diff.
@vslashg
Copy link
Author

vslashg commented Sep 20, 2024

We found ourselves needing a tool to reverse diffs, and wrote one in terms of sourcegraph/go-diff. Some colleagues suggested that this library might be generally useful, so I'm offering this as a contribution.

@vslashg vslashg closed this Sep 20, 2024
@vslashg
Copy link
Author

vslashg commented Sep 20, 2024

Sorry, I need to make a quick edit. I'll repost soon.

@vslashg
Copy link
Author

vslashg commented Sep 24, 2024

Sorry about the noise. This PR is ready for consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant