Actually, get_branch() does _not_ validate. Which is why it thinks that
the current branch is "master" even if there is no commit yet.
OTOH, resolve_ref() reads the SHA-1 of the ref, which fails in the case
that there has not been any commit yet.
Still, I think that it would be nice to allow "git pull origin
master:master" in a freshly initied non-bare repository, so I like
resolve_ref() better.
Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html