auto-commit-msg icon indicating copy to clipboard operation
auto-commit-msg copied to clipboard

Apply style effect

Open MichaelCurrin opened this issue 5 years ago • 0 comments

Use style in Semantic section - check if the changes are all whitespace only.

For staged, check if there is a diff. and check if the no-whitespace diff is empty (need to check by hand). Then you know there are only whitespace changes.

Repeat for unstaged as fallback.

Otherwise you need to do regex checks against each file diff (maybe using plain diff and not diff-index? either way need patch output)

Flags for diff-index https://www.git-scm.com/docs/git-diff-index

-b
--ignore-space-change

    Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.
-w
--ignore-all-space

    Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none.

MichaelCurrin avatar Aug 11 '20 11:08 MichaelCurrin