HomePhabricator

Fix isValidGitShallowCloneResponse

Description

Fix isValidGitShallowCloneResponse

Summary:
Changes the heuristic method by which non-zero exit statuses from git-http-backend are found to be due to packfile negotiation during shallow fetches, etc.

Instead of checking git-http-backend stderr for a generic "hung up" error message, see if the pack-result response contains a terminating flush packet ("0000"). This should give a greater assurance that the request was handled correctly and the response is complete.

Test Plan: Run GIT_CURL_VERBOSE=1 git fetch --depth 1 https://host.example/source/repo.git HEAD to ensure it completes and includes two successful POST requests during packfile negotiation (the last one actually receives the packfile).

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin, dzduvall

Tags: Diffusion

Differential Revision: https://secure.phabricator.com/D21484

Details

Auditors
20after4
Provenance
epriestleyAuthored on Oct 30 2020, 8:03 PM
epriestleyPushed on Oct 30 2020, 8:46 PM
Reviewer
Blessed Reviewers
Differential Revision
D21484: Fix isValidGitShallowCloneResponse
Parents
rP671986592baf: Add a missing "GROUP BY" to MailQuery when querying for multiple recipients
Branches
Unknown
Tags
Unknown
Build Status
Buildable 24955
Build 34430: Run Core Tests