kalekundert / stepwise

Modular, command-line scientific protocols
GNU General Public License v3.0
3 stars 0 forks source link

Don't count indentical protocols as duplicates #38

Open kalekundert opened 3 years ago

kalekundert commented 3 years ago

For example:

$ 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.