mirage / irmin

Irmin is a distributed database that follows the same design principles as Git
https://irmin.org
ISC License
1.84k stars 153 forks source link

irmin-pack: implement `fresh` for lower layer #2238

Open metanivek opened 1 year ago

metanivek commented 1 year ago

A low priority leftover task from #2182.

Currently the code does not properly support using the fresh configuration flag when using a lower layer. It simply prints a message telling the user to remove the data in the lower layer path provided. To properly support this flag, we should recursively delete the data in the provided path.

https://github.com/mirage/irmin/blob/03ad27f4581547ee872a3a4e1512a74914c04b7b/src/irmin-pack/unix/file_manager.ml#L470-L475