-
Notifications
You must be signed in to change notification settings - Fork 29
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
Handle unknown files gracefully #160
Comments
Yeah I suppose we could do that. I think I'd prefer having this be a configurable option with an error being the default behavior, maybe have a "passthrough" option that invokes another executable if diffsitter doesn't support the file type? |
Great! Any idea if you are planning a new release soon? |
Hey, sorry about this, missed your comment, but I pushed |
No worries! Just confirming the change works well. I just had to figure out where exactly to put the config. #249 |
Is your feature request related to a problem? Please describe.
In this discussion which spanned from #155 it was noted that diffsitter cannot handle files it does not have the grammar for. This is an issue when trying to show diff in a git repository with a mix of supported and unsupported files.
Describe the solution you'd like
It would be nice if diffsitter was able to show diffs the same way that
diff
shows diff when the files are not supported. I'd be happy even if it only invokeddiff
in the backgroundDescribe alternatives you've considered
With an intermediary script I guess it could achieve naively this way:
diffsitter "$@" || diff "$@"
. It has been suggested to use.gitattribute
for the git case, but this won't scale beyond thegit
usecase.The text was updated successfully, but these errors were encountered: