e11da03e7a
Name collisions can become a big issue in liboverrides when production files gets messy (weird overrides duplicates, bad resync with heavily changing assets, etc.). This commit tries to alleviate a bit the problem by generating 'more unique' names for liboverrides, when an exact match with the reference is not possible. So by default, in most common case, the liboverride ID will still have the exact same name as its linked reference. If this is not possible, then the new liboverride ID will get a name which is unique to within the whole current Main (for its ID type). In particular, this ensure that new override IDs are either named exactly as their references, or have a name which is not used by any other reference (linked) IDs. Note that this is not a perfect solution, since changes in library data can lead to name collisions later on. However, it should greatly reduce the frequency of such problems.