pasbi/ommpfritt

Improve version control experience

开放

#112 创建于 2020年7月22日

 (0 条评论) (0 个反应) (0 位负责人)C++ (7 个派生)auto 404
enhancementgood first issue

仓库指标

星标
 (46 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南