Skip to content

git: Parse `FETCH_HEAD` reference from output

Justin Tobler requested to merge jt-fetch-remote-objects into master

Git servers can be configured to allow fetching objects from a provided object ID. In this scenario, the fetched objects are only written to FETCH_HEAD and therefore the local reference printed in the porcelain fetch output is FETCH_HEAD.

When parsing references from git-fetch(1) output, the reference is validated. The current validation operation does not support FETCH_HEAD as a valid reference and consequently results in an error being returned.

Update the porcelain fetch scanner to support git-fetch(1) operations requesting explicit object IDs.

Merge request reports