-
-
Notifications
You must be signed in to change notification settings - Fork 116
2022 03 19 default value for word diff regex
Sebastien edited this page Mar 21, 2022
·
1 revision
- Status: accepted
- Date: 2022-03-19
Technical Story:
--ignore-whitespace, -W
params have been not working since git changed the behaviour of --word-diff-regex
behaviour.
The generated delta does not filter whitespace changes only because git diff --name-status
does not consider whitespace ignoring parameters.
- Fix the
--ignore-whitespace, -W
params - Performance
- Maintainability
- Option 1 - Set the default value, use
--name-status
and diff each files - Option 2 - Set the default value, use
--numstat
and--diff-filter
Chosen option: "Option 2", because of performance impact and simple refactoring
-
--ignore-whitespace, -W
params is fixed -
--word-diff-regex
behaviour is fixed, it is not possible to have discrepancy based on.gitattributes
or.git/config
- performance are still good
-
--word-diff-regex
behaviour is fixed, it is not possible to drive it based on.gitattributes
or.git/config
- Maintenance is a little bit harder, we now have 3 call to git (One for Added/Modified/Deleted)
- Good, we still use name-status
- Bad, we have to diff each file with ignore white space git diff parameter and detect the one with no changes
- Bad, performance drops
- Good, easy refactoring
- Good, few impact on performance
- Bad, 3 calls for Added, Modified and Deleted git diff filter