Merge branch 'mm/fetch-show-error-message-on-unadvertised-object'

"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
This commit is contained in:
Junio C Hamano
2017-03-14 15:23:18 -07:00
7 changed files with 66 additions and 30 deletions

View File

@ -89,8 +89,13 @@ struct ref {
force:1,
forced_update:1,
expect_old_sha1:1,
deletion:1,
matched:1;
deletion:1;
enum {
REF_NOT_MATCHED = 0, /* initial value */
REF_MATCHED,
REF_UNADVERTISED_NOT_ALLOWED
} match_status;
/*
* Order is important here, as we write to FETCH_HEAD