-
Notifications
You must be signed in to change notification settings - Fork 237
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 unified diff format #118
Conversation
cb6858f
to
fb4d038
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you list the current ways this differs from git diffs?
How is it performing?
+++ <file_name> | ||
This means that you will be editing old_file_name in the next section of the edit. | ||
Just like a git diff, to rename a file, put a different name in the +++ section from the --- section; to create a file, put --- /dev/null; and to delete a file, put +++ /dev/null. | ||
Unlike a git diff, when deleting a file, there is no need to print the removed lines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it listen to this well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes actually!
The things I want to try out that would make it more similar to an actual git diff are adding a/ and b/ before the filenames, adding a git --diff a/file_name b/file_name line, and using a @@ @@ symbol between changes (which normally indicates the line numbers in a weird format) I haven't actually used it too much; I mainly want to get this merged to stop conflicts, since tweaking the prompt won't cause any conflicts. I'm planning on tweaking the prompt later, and once I get it to be good I'll use the benchmarks with GPT's evaluation to determine if I should add the more git diff-like things above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging but when we run benchmarks lets try variations on it
Adds a unified diff format similar to git diff
TODO:
BUG: Empty delimiters for deletions (and renames with no changes)Because of the nature of this format, it would be pretty difficult to fix this (especially renames); if we ever end up making this the primary format, we can work on fixing it, but until then it would overcomplicate things to botherTest out adding a/ and b/ for filenames, adding git --diff a/ b/ line, and adding double set of @@ (maybe with end between them for the final one?) in order to more closely match the git diff formatThis will be a lot easier to test out once we have GPT automatically telling us why it's failing on benchmarks; postponing this until after we get that done.