diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-28 13:52:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-28 13:52:22 -0700 |
commit | 2b69d3116ffb4a800c408b8cb0b508ca1886ea84 (patch) | |
tree | 9da24f1cd0d0a7bfc7b79a086c67f55c1249b513 /builtin | |
parent | 41534b626ebdf3fb4fb692749245b90ff2bb7e13 (diff) | |
parent | d56583ded679f2eade3994d855c8d605e2964710 (diff) | |
download | git-2b69d3116ffb4a800c408b8cb0b508ca1886ea84.tar.gz git-2b69d3116ffb4a800c408b8cb0b508ca1886ea84.tar.xz |
Merge branch 'mm/fetch-show-error-message-on-unadvertised-object' into maint
"git fetch" that requests a commit by object name, when the other
side does not allow such an request, failed without much
explanation.
* mm/fetch-show-error-message-on-unadvertised-object:
fetch-pack: add specific error for fetching an unadvertised object
fetch_refs_via_pack: call report_unmatched_refs
fetch-pack: move code to report unmatched refs to a function
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch-pack.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index cfe9e447c..2a1c1c213 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -219,12 +219,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) * remote no-such-ref' would silently succeed without issuing * an error. */ - for (i = 0; i < nr_sought; i++) { - if (!sought[i] || sought[i]->matched) - continue; - error("no such remote ref %s", sought[i]->name); - ret = 1; - } + ret |= report_unmatched_refs(sought, nr_sought); while (ref) { printf("%s %s\n", |