This should be using:

  excludesFile = repository.getFS().resolve(
    repository.getFS().userHome(),
    p.substring(2));

On Cygwin the user might have pointed us to ~/.my-ignores which is a symlink to someplace else.