add --float-precision option, fix duplicateUFO and add more tests #34
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.
Timestamps sometimes may change even though the content of files does not (e.g. the file is 'touched' but not modified). I don't like when git detect changes in lib.plist only because the timestamps have changed, but the content isn't. Git itself tracks changes using hashes rather than timestamps, and can tell me exactly the list of files which have been modified.
So when I keep a UFO under version control, I want to be able to tell the normalizer to not store the timestamps.
In a follow-up PR, I'll add a
--subpaths
option that applies the normalization only to the specified set of files. The latter can be used in conjunction with--no-modtimes
to pass the ufonormalizer the list of files modified as pergit diff --name-only
.In addition, the current PR adds
--float-precision
command line option. The special value of-1
means no rounding (i.e.,repr()
).