driusan / dgit

A Pure Go Git Implementation
MIT License
112 stars 10 forks source link

Add support for reflog expire --expire=now --all #234

Closed driusan closed 5 years ago

driusan commented 5 years ago

This adds a hack for supporting "reflog expire --expire=now --all".

When that exact combination of parameters exist, the logs directory is walked and all reflog files are simply truncated.

This allows us to run the setup of the t1450-fsck test from the official git test suite. (There's a catch-22 where fsck tests depend on reflog and reflog tests depend on fsck, but this adds just enough to try adding fsck support.)