As fetch_some
, update git ?capabilities ~references repository
is the other side of the communication with a Git server and update and create remote references when it uploads local hashes.
reference
is a map which:
- the key is the local reference.
- the value is a list of remote references - which may not exist yet.
Then, the function will try to upload all of these local references to the binded remote references. If binded remote reference does not exist on the server, we ask to the server to create and set it to the local hash.
For each update action, we check if the local store has the remote hash. In other case, we miss this action - that means, the local store is not synchronized with the server (and the client probably needs to fetch_some
before).
Then, it returns a list of results. The Ok
case with the remote reference which the server updated correctly and the Error
case with the remote reference which the server encountered an error with a description of this error.
At this final stage, the function does not encountered any error during the commmunication - if it's the case, we did not do any modification on the server and return an error
.