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
provide context in the form of unchanged lines or AST nodes #744
Comments
I think this, and providing the output in a more As currently is, the output format is so newline/whitespace heavy and different from existing diff patterns that it's sort of painful to use (particularly over large files) For example, using this repo (Ref), and this git config: # https://github.com/afnanenayet/diffsitter
[difftool "diffsitter"]
cmd = diffsitter "$LOCAL" "$REMOTE"
# https://github.com/afnanenayet/diffsitter
[difftool "diffsitter-debug"]
cmd = diffsitter --debug "$LOCAL" "$REMOTE" Here is the first 100 lines of output from a diff with
|
Is your feature request related to a problem? Please describe.
When using diffsitter as tool for
git diff
, line numbers don't make it immediately obvious where the change occurred.Describe the solution you'd like
It would be nice if some surrounding context (3 lines before, 3 lines after) could be given, similar to how regular
git diff
anddiff -C3
do it.Describe alternatives you've considered
An alternative would be to allow machine-readable types of output (eg.
json
) for me or anyone else to write a new front-end around the logic of diffsitter.Additional context
If it's not as obvious what counts as a line in AST-land, I would also be happy if I could get 10 AST nodes before and 10 AST nodes after the change (or some other configurable amount).
The text was updated successfully, but these errors were encountered: