Skip to content

[enhancement] Add flag '--ignore-blank-lines' when ignoring whitespace - #2455

Merged
love-linger merged 1 commit into
sourcegit-scm:developfrom
goran-w:ignore-blank-lines-along-with-whitespace
Jun 22, 2026
Merged

[enhancement] Add flag '--ignore-blank-lines' when ignoring whitespace#2455
love-linger merged 1 commit into
sourcegit-scm:developfrom
goran-w:ignore-blank-lines-along-with-whitespace

Conversation

@goran-w

@goran-w goran-w commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Inspired by a discussion in PR #2411.

  • With the added option --ignore-blank-lines, some more cases of changes in (added / removed) empty lines will be ignored (but apparently not when there are also other unignored changes in the same file).
  • Still, it's a useful addition wherever it applies, since it helps in quickly skipping over files that have only empty-line / line-break changes (by displaying the No changes or only EOL changes panel).
  • Also renamed argument unified to numContextLines, for clarity.
…ace changes

* This causes some more cases of changes in (added/removed) empty lines to be ignored (but apparently not when there also other unignored changes in the same file).
* Still, it's a useful addition wherever it applies, since it helps in quickly skipping over files that have only empty-line changes.
* Related to discussion in PR sourcegit-scm#2411.
* Also renamed argument 'unified' to 'numContextLines', for clarity.
@goran-w

goran-w commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@love-linger NOTE: This PR incurs a very minor change, and I see no adverse effects of adding the additional Git flag --ignore-blank-lines when we're already applying --ignore-space-change.

@love-linger love-linger self-assigned this Jun 22, 2026
@love-linger love-linger added the enhancement New feature or request label Jun 22, 2026
@love-linger
love-linger merged commit c677d62 into sourcegit-scm:develop Jun 22, 2026
14 checks passed
@goran-w
goran-w deleted the ignore-blank-lines-along-with-whitespace branch June 22, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

2 participants