When using the artifacts POST API endpoint to attach a file to a ref in a repository, one can currently reuse a single filename for multiple uploads to different refs. In this case, the older file is overwritten and the URL for any artifacts attached with the same name to other refs becomes incorrect.
There should be an error when this is attempted, to avoid naming conflicts and incorrect attachment URLs.
The API does currently signal an error when one attempts to reuse a filename within the same ref. But, because the refs are stored in a single per-repository namespace, the API should also signal an error when a duplicate filename is used with a different ref.
Here is a concrete example where one version of a file was uploaded to
refs/tags/0.2.0, then another to
refs/tags/0.3.0 with the same filename.