Allow batch-fetch endpoint to delete refs

Currently ref deletion is only wired to apply-object.

If the apply-object call fails for any reason, when the client falls
back to the fetch call, the receiving end would just attept to *fetch*
the deleted ref.

This is obviously destined to fail, since the remote ref does not exist
anymore and thus cannot be fetched.

Change this behaviour by hydrating the payload request with the
additional information of the ref deletion status.

The receving side can then opportunely schedule a deletion (rather than
a fetch) for the refs that have been deleted.

Note that this change does not change the payload of the single fetch
endpoint, so that back-compatibility can be provided during the rollout
phase by temporarily switching off batch mode until all nodes have been
migrated to this version.

Bug: Issue 288965464
Change-Id: I0c8591ee01caa80927ac16375ba8bd98d434ceb4
19 files changed
tree: 8ea4904969e22d431638d3e697c0278392ec8a94
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. Jenkinsfile
  6. LICENSE