Skip to content

pr diff color output fixes#4833

Merged
vilmibm merged 2 commits intotrunkfrom
diff-color
Dec 1, 2021
Merged

pr diff color output fixes#4833
vilmibm merged 2 commits intotrunkfrom
diff-color

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Dec 1, 2021

  1. Avoid erroring out on very long lines (> 4 KiB), fixes gh pr diff error on long line #4633
  2. Respect NO_COLOR, CLICOLOR_FORCE environment settings when --color=auto (default)

To handle lines of arbitrary size, bufio.Reader is now used instead of bufio.Scanner.

In the absence of an explicit `--color` setting, or when `--color=auto`
is passed, the pr diff command should fall back to respecting the global
colorization setting as inferred from the environment.
@mislav mislav requested a review from a team as a code owner December 1, 2021 16:08
@mislav mislav requested review from vilmibm and removed request for a team December 1, 2021 16:08
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woo!

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

Successfully merging this pull request may close these issues.

gh pr diff error on long line

2 participants