-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
The program uses only the hostname to address the issue of requiring thin pack to perform a git clone operation on Azure DevOps, as shown in the code snippet below.
Lines 56 to 78 in d045c1c
if parsed.Hostname() == "dev.azure.com" { | |
// Azure DevOps requires capabilities multi_ack / multi_ack_detailed, | |
// which are not fully implemented and by default are included in | |
// transport.UnsupportedCapabilities. | |
// | |
// The initial clone operations require a full download of the repository, | |
// and therefore those unsupported capabilities are not as crucial, so | |
// by removing them from that list allows for the first clone to work | |
// successfully. | |
// | |
// Additional fetches will yield issues, therefore work always from a clean | |
// clone until those capabilities are fully supported. | |
// | |
// New commits and pushes against a remote worked without any issues. | |
// See: https://github.com/go-git/go-git/issues/64 | |
// | |
// This is knowingly not safe to call in parallel, but it seemed | |
// like the least-janky place to add a super janky hack. | |
transport.UnsupportedCapabilities = []capability.Capability{ | |
capability.ThinPack, | |
} | |
logf("Workaround for Azure DevOps: marking thin-pack as unsupported") | |
} |
However, since Azure DevOps supports self-hosted servers, the hostname may not necessarily be dev.azure.com. Therefore, it is desired to add a command-line option to enable this functionality.
I opened a pull request below.
#446
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed