Oxen-AI / Oxen

Oxen.ai's core rust library, server, and CLI
https://oxen.ai
Apache License 2.0
172 stars 11 forks source link

Bug/commit #357

Closed rpschoenburg closed 3 weeks ago

rpschoenburg commented 3 weeks ago

Added bug fix for oxen commit and corresponding unit test. Previously, committing deleted files would cause the repository to get stuck, as with the following code:

oxen add a.csv rm a.csv oxen commit -m "added a.csv"

This is fixed by adding a check to remove files without existent paths at commit time. The check is O(N), as it must check every file in the commit, but that appears to be necessary for correctness.

This currently does not provide perfectly analogous behavior to git, which has been documented in detail