ommpfritt icon indicating copy to clipboard operation
ommpfritt copied to clipboard

Improve version control experience

Open pasbi opened this issue 4 years ago • 0 comments

The current file format (JSON) has a lot of potentials to be used with common version control systems (e.g., git) because it is text-only and naturally line-based. Although, JSON can be stored in a minified way without line breaks, but omm, but that's not the case here.

Two details prevent the user from having a great experience tracking omm-files with VCS:

  • [ ] if an object is moved to another parent, the indentation of the corresponding lines in the JSON-file may change. Most VCS are (fundamentally) not able to match lines that differ. A solution would be to remove all indentation from JSON by default when storing the file in omm. It would make it somewhat harder to read as a human, but there are tools that can restore indentation very easily.

  • [ ] Sometimes there are random fluctuations of numerical values. They are insignificant to the appearance of the scene, but it occludes and clutters diffs which occur frequently when working with VCS. Rounding could be a solution (but what precision is a good tradeoff?). A proper solution would be investigating where these fluctuations come from, maybe the root of the problem can be replaced with a numerically more stable routine.

pasbi avatar Jul 22 '20 13:07 pasbi