support for inserting annotations (code review comments) #1704
evanbattaglia
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been thinking about how to use delta as a base for a gerrit/github terminal code review tool. Delta's beautiful diff output is awesome, I just need to figure out a way to display the comments (and make a new comment, but that's a secondary concern for now).
I have a JSON file list of comments with authors, files, and line numbers, and I'd like to merge that into the output (probably right below the commented line). I played around with doing
git show | delta > diff.txtand merging the comments into that output, but it requires parsing delta's output to figure out files and line numbers. Doable, but seems fragile and hacky (for instance, I need to remove color codes, it's hard to identify a new filename), and delta may know the correct terminal size.As far as I can tell, delta doesn't have support for adding any extra annotations, is this correct? has this possibility been explored? e.g., you give it a JSON file of files/line numbers (and tell it which file the line numbers are for) and text blobs, and it adds in the annotations under the lines.
If that's too specific of a feature, maybe some way to make delta output the user-friendly pretty output along with machine-readable metadata (not sure how this would work)? Or some kind of plugin system?
Anyway, just wanted to see if people think would be a viable feature, if there's an easier method I missed. Thanks for an awesome tool!
Beta Was this translation helpful? Give feedback.
All reactions