As we’ve implemented Git on z/OS right now, extended file attributes can be lost if you switch branches. You can maintain them with a post-checkout hook. The hook we’re using on the RDL project is:
main:
address syscall "chdir" toplevel()
call bpxwunix "find . -type d",,stdout.
do # = 1 to stdout.0
if \starts("./.git", stdout.#) then
"extattr -Fnl" stdout.#"/* 2>/dev/null"
end
exit 0
It sets the nl attribute recursively on all files that are not in .git directories.
Edit: The toplevel function returns the result of a “git rev-parse --show-toplevel” command. The starts function returns a boolean indicating whether the second string starts with the first.