More efficient alternative might be to catch errors when doing the remote add, possibly looking for the specific error string that we know it displays when it already exists. This way we save a command in the mainstream case.