Fix newlines in msg "changes detected..."#53
Open
lightmare wants to merge 2 commits intotravis-ci:bashfrom
Open
Fix newlines in msg "changes detected..."#53lightmare wants to merge 2 commits intotravis-ci:bashfrom
lightmare wants to merge 2 commits intotravis-ci:bashfrom
Conversation
Also, highlight only the first line of the message. DIFF_FILE dump need not be colorized.
wc outputs count without file name if none are given.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are currently two literal
\n(backslash+n, not newlines) in the "changes detected" message: one on the first line, followed immediately by a changed file's name; another on the last line, after the last changed file name.See for example: https://travis-ci.org/mapnik/mapnik/jobs/617797520#L2189-L2211
This PR changes the output such that the initial "changes detected..." line is printed separately, in green as before, and then the head of DIFF_FILE without coloring (I don't think it was actually intended to dump the whole thing in green; as you can see in the example above, color didn't persist across multiple lines).
This PR kinda voids #49 (which I think is a bad idea) and consequently #50.
Admittedly, #49 would fix this issue in its way, but at the same time create another: it would make the function
msgclunky for printing anything coming from the outside (such as a list of user-created files). And #50 clearly shows that'd lead to leaning toothpick syndrome.