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

line-diff.js give ENOBUFF for execSync command for large diffs #25

Open
lorranmira opened this issue Aug 9, 2022 · 1 comment
Open

Comments

@lorranmira
Copy link

Hi,
Is is possible to update the use of execSync in line-diff.js to match how it is used in index.js?
Currently it appears to use the default value for maxBuffer

@atidyshirt
Copy link
Contributor

atidyshirt commented Aug 16, 2022

@lorranmira I am also running into the same issue, it would be nice to have the option to add options to the git diff command used in line-diff.js to allow for filtering, I am going to submit a PR to deal with this issue to allow for sending an additional option at the end to allow for filtering. A use-case for this would be to remove generated files from the diff you could use the following syntax to filter

here is the command we would like

git diff -xyzOptions -- *.{ts,js,<any-other-accepting-glob>}

and this will allow us to not accept generated files such as yarn.lock, *.json, etc

Feel free to comment on any suggestions to how this might be implemented

If you are looking for a temporary solution

you can use the currentBranch flag to carry out the command you would like by simply appending it an example being:

diff({
    currentBranch = "HEAD -- *.ts"
});

atidyshirt added a commit to atidyshirt/last-commit-log that referenced this issue Aug 31, 2022
xudafeng pushed a commit that referenced this issue May 1, 2023
* GH-25: adding optional flags and post-options for line-diff.js

* Delete yarn.lock

---------

Co-authored-by: fengmk2 <[email protected]>
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

No branches or pull requests

2 participants