diff --git a/buildenv b/buildenv index b55e99c..17fa8e7 100644 --- a/buildenv +++ b/buildenv @@ -118,6 +118,7 @@ zopen_post_install() mkdir -p "$1/etc" touch "$1/etc/gitconfig" # empty it out to avoid error with --system option + touch "$1/etc/gitattributes" # empty it out to avoid error with --system option # Install a cacert.pem to be used (optionally) by the customer if ! $MYDIR/zopen update-cacert -f $1 ; then @@ -171,6 +172,7 @@ GIT_EXEC_PATH|set|PROJECT_ROOT/libexec/git-core ZOPEN_GIT_SSL_CAINFO|set|PROJECT_ROOT/cacert.pem ASCII_TERMINFO|set|PROJECT_ROOT/../../ncurses/ncurses/share/terminfo/ GIT_CONFIG_SYSTEM|set|PROJECT_ROOT/etc/gitconfig +GIT_CONFIG_SYSTEM|set|PROJECT_ROOT/etc/gitattributes _ENCODE_FILE_NEW|unset| EOF } diff --git a/stable-patches/attr.c.patch b/stable-patches/attr.c.patch new file mode 100644 index 0000000..3166bbb --- /dev/null +++ b/stable-patches/attr.c.patch @@ -0,0 +1,16 @@ +diff --git i/attr.c w/attr.c +index 0bd2750..9e17884 100644 +--- i/attr.c ++++ w/attr.c +@@ -873,9 +873,10 @@ static struct attr_stack *read_attr(struct index_state *istate, + + const char *git_attr_system_file(void) + { +- static const char *system_wide; ++ char *system_wide = xstrdup_or_null(getenv("GIT_ATTR_SYSTEM")); + if (!system_wide) + system_wide = system_path(ETC_GITATTRIBUTES); ++ normalize_path_copy(system_wide, system_wide); + return system_wide; + } +