diff --git a/attr.c b/attr.c index 9922529b58c381..47dc379a9794b8 100644 --- a/attr.c +++ b/attr.c @@ -832,6 +832,14 @@ static const char *git_etc_gitattributes(void) return system_wide; } +static const char *git_xcode_gitattributes(void) +{ + static const char *xcode_gitattributes; + if (!xcode_gitattributes) + xcode_gitattributes = system_path("share/git-core/gitattributes"); + return xcode_gitattributes; +} + static const char *get_home_gitattributes(void) { if (!git_attributes_file) @@ -874,7 +882,10 @@ static void bootstrap_attr_stack(struct index_state *istate, /* system-wide frame */ if (git_attr_system()) { - e = read_attr_from_file(git_etc_gitattributes(), flags); + e = read_attr_from_file(git_xcode_gitattributes(), 1); + push_stack(stack, e, NULL, 0); + + e = read_attr_from_file(git_etc_gitattributes(), 1); push_stack(stack, e, NULL, 0); }