Skip to content

git: allow reading the attributes for 'git-merge-tree(1)'

There was a recent regression in Git which caused git-pack-index's perf to degrade due to the setting of 'attr.tree=HEAD' as default. In 274135e2 (git: Set attr.tree for git commands), we tried to work around this regression.

We did so, by only adding 'attr.tree=HEAD' to certain required commands and released this behind a feature flag. While this got around the regression, this caused a bug wherein 'git-merge-tree(1)' wouldn't acknowledge attribute settings since it wasn't one of the commands in the whitelist.

This means RPCs such as 'ListConflictFiles' which internally uses 'git-merge-tree(1)' also fail to acknowledge the '.gitattributes' file. The fix is to simply add 'merge-tree' to the whitelist. But let us also add a test while we're here, to ensure this doesn't break again in the future.

Changelog: fixed

Closes #6193 (closed)

Merge request reports