This PR addresses an issue with the repository root path in an Irmin-git repo that follows a preceding Irmin-git repo. Additionally, it eliminates the potential for duplicate root entries in an Irmin config.
Irmin-git issue
The issue arose when trying to create two Irmin-git repos one after the other:
After creating pipeline_cfg, the users repository is unable to find its root, as when Irmin-git creates a "fresh root key", it overrides the Univ function that was able to decode the root directory string for users from the config's Univ map.
This results in a new git repo being created in the project's current working directory, which isn't the expected behavior and can even break an existing git repository.
Duplicate root entry
After fixing the issue with Irmin-git, I noticed it was only possible because of the allow_duplicates flag.
I believe that it allows for a dangerous operation that should not be performed.
This PR addresses an issue with the repository root path in an
Irmin-git
repo that follows a precedingIrmin-git
repo. Additionally, it eliminates the potential for duplicate root entries in an Irmin config.Irmin-git
issueThe issue arose when trying to create two
Irmin-git
repos one after the other:After creating
pipeline_cfg
, theusers
repository is unable to find its root, as whenIrmin-git
creates a "fresh root key", it overrides theUniv
function that was able to decode the root directory string forusers
from the config'sUniv
map. This results in a new git repo being created in the project's current working directory, which isn't the expected behavior and can even break an existing git repository.Duplicate
root
entryAfter fixing the issue with
Irmin-git
, I noticed it was only possible because of theallow_duplicates
flag. I believe that it allows for a dangerous operation that should not be performed.