Open mih opened 2 years ago
I wonder what would be a better behavior in this case. Overwriting an existing alias seems dangerous because it could belong to a different dataset. Its not the same concept, but I think it also wouldn't match what e.g., git remote
does when I'm asking to rename a remote to a name that is already taken:
adina@muninn in ~/repos/datalad on git:bf-6950
❱ git remote rename gh-adswa upstream
error: remote upstream already exists.
Not emitting a message might cause confusion if the alias exists but belongs to a different dataset. So maybe an additional check if the pre-existing alias belongs to the current dataset, and only warn if it belongs to a different one?
From the POV of my present use case, I would have expected exactly that "overwriting an existing alias", because I am using aliases as a point (e.g. "current") to identifiy a dataset of interest that is changing over time.
Maybe the command could issue a warning that it was, in fact, replacing a previous alias, and report the replaced target, such that a user could go in and undo the action, if necessary,
why ist that, when I instruct the command to "reconfigure"? Moreover, in my case, the alias would not even change (name or target), it warns nevertheless.
Bad UX IMHO.