Skip to content

repository: Handle empty root trees in GetArchive

Will Chandler (ex-GitLab) requested to merge wc/get-archive-empty-tree into master

Currently requesting GetArchive of a full repo on a commit with an empty root tree (i.e. an empty project) git archive will error out with fatal: pathspec '.' did not match any files. This will result in an Internal` error being returned, leading to spurious incident reports for the SRE team.

To resolve this, when the requested path is ".", the default for web and API, validate that the root tree of the commit is not empty.

Closes #4786 (closed)

Merge request reports

Loading