Oxen-AI / Oxen

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

Bug/commit #357

Closed rpschoenburg closed 5 months ago

rpschoenburg commented 5 months 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