push: detect local refspec errors early
commitba928c13d75172799f5f06f922e5c2f3232cf114
authorJeff King <peff@peff.net>
Wed, 5 Mar 2014 19:04:54 +0000 (5 14:04 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Mar 2014 21:23:27 +0000 (5 13:23 -0800)
treefd6e79fcdab6544f2b565a2a199df2ff30cca962
parent471fd3fe410ad95ef11270a865203482ce4bca7d
push: detect local refspec errors early

When pushing, we do not even look at our push refspecs until
after we have made contact with the remote receive-pack and
gotten its list of refs. This means that we may go to some
work, including asking the user to log in, before realizing
we have simple errors like "git push origin matser".

We cannot catch all refspec problems, since fully evaluating
the refspecs requires knowing what the remote side has. But
we can do a quick sanity check of the local side and catch a
few simple error cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c
remote.h
t/t5529-push-errors.sh [new file with mode: 0755]
transport.c