Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions buildenv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
16 changes: 16 additions & 0 deletions stable-patches/attr.c.patch
Original file line number Diff line number Diff line change
@@ -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;
}