$ mkdir a b
$ echo "- A" > a/foo.txt
$ ln -s ../a/foo.txt b/foo.txt
$ sw foo
Presently, this will fail because both copies of the protocol will be found, and it is ambiguous which is meant. But in this case the ambiguity is irrelevant, because the protocols are actually the same.
I don't think it's be smart to check for equivalency by actually evaluating the protocol, because that could be expensive (and could trigger errors). But checking to see if the files are identical should cover the basic case of symlinked and hardlinked protocols.
For example:
Presently, this will fail because both copies of the protocol will be found, and it is ambiguous which is meant. But in this case the ambiguity is irrelevant, because the protocols are actually the same.
I don't think it's be smart to check for equivalency by actually evaluating the protocol, because that could be expensive (and could trigger errors). But checking to see if the files are identical should cover the basic case of symlinked and hardlinked protocols.