diff options
author | Jeff King <peff@peff.net> | 2014-03-05 14:04:54 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-05 13:23:27 -0800 |
commit | ba928c13d75172799f5f06f922e5c2f3232cf114 (patch) | |
tree | fd6e79fcdab6544f2b565a2a199df2ff30cca962 /remote.h | |
parent | 471fd3fe410ad95ef11270a865203482ce4bca7d (diff) | |
download | git-ba928c13d75172799f5f06f922e5c2f3232cf114.tar.gz |
push: detect local refspec errors earlyjk/detect-push-typo-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>
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -166,6 +166,7 @@ extern int query_refspecs(struct refspec *specs, int nr, struct refspec *query); char *apply_refspecs(struct refspec *refspecs, int nr_refspec, const char *name); +int check_push_refs(struct ref *src, int nr_refspec, const char **refspec); int match_push_refs(struct ref *src, struct ref **dst, int nr_refspec, const char **refspec, int all); void set_ref_status_for_push(struct ref *remote_refs, int send_mirror, |