Skip to content

Fix incorrect tree entries retrieved with directories that have curly braces

Stan Hu requested to merge sh-fix-filenames-with-curly-braces into master

In a git cat-file request in the form of ref^{tree}:{{folder}}, a trailing } causes Git to give up early and assume the intended tree is the root tree. This appears to be a bug in Git: https://marc.info/?l=git&m=154533633212043&w=2

Until that Git bug is resolved, we work around the problem by omitting the type restriction. This restriction is checked in the Gitaly service code in any case.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46261

Edited by GitLab Release Tools Bot

Merge request reports