Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Fix has_changed with large diff output #13

Merged
merged 1 commit into from
May 21, 2019
Merged

Fix has_changed with large diff output #13

merged 1 commit into from
May 21, 2019

Conversation

lstoll
Copy link
Contributor

@lstoll lstoll commented Apr 26, 2019

has_changed uses grep with the quiet flag, which returns after the first match
is found. This causes issues with input that has a large number of lines and a
match that is triggered early, as grep returns and causes the echo to fail
writing to the pipe. Echo's exit status is used for the test because the
pipefail option is set, ultimately causing the change to be skipped.

Fix this by removing the echo, and replacing it with a herestring.

has_changed uses grep with the quiet flag, which returns after the first match
is found. This causes issues with input that has a large number of lines and a
match that is triggered early, as grep returns and causes the echo to fail
writing to the pipe. Echo's exit status is used for the test because the
pipefail option is set, ultimately causing the change to be skipped.

Fix this by removing the echo, and replacing it with a herestring.
@lstoll
Copy link
Contributor Author

lstoll commented May 16, 2019

@chronotc any thoughts on landing this fix?

@chronotc
Copy link
Collaborator

Thanks for the enhancement @lstoll. Sorry for taking so long

@chronotc chronotc merged commit a0ce8d5 into adikari:master May 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants