contrib/subtree: allow addition of remote branch with name not locally present

cmd_add() attempts to check for the validity of the given commit
before adding the repository as a subtree. It tries to do so before
contacting the repository. If the given ref happens to exist locally
(say 'master') then the test passes and the repo is fetched. But that
local 'master' does not have anything to do with the 'master' we are
going to fetch from the remote repository in the first place.

Remove this pointless test, and replace it with a new check to
prevent pulling in multiple branches or creating a remote tracking
branch for the subtree.

A typo made on the command line will still be caught in the "git
fetch" that is run immediately after this part of the code, that
will die with:

  fatal: Couldn't find remote ref <refspec>

which is an accurate diagnosis.

Signed-off-by: Paul Campbell <pcampbell@carnegiecollege.ac.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'pc/subtree-add-before-fetch' into pu

* pc/subtree-add-before-fetch:
  contrib/subtree: allow addition of remote branch with name not locally present