git-lfs/git
brian m. carlson e31b07135c
git: use git var to find system gitattributes file
At the moment, Git doesn't provide us a way to know where the system
gitattributes file is.  To help find it, we use the `PREFIX` environment
variable and tack on `etc/gitattributes`.  However, as a practical
matter, nobody sets `PREFIX`, so typically we always use
`/etc/gitattributes`.

That being said, Git has just learned a way to provide this information
using `git var GIT_ATTR_SYSTEM` to print this information, and this will
be included in Git 2.42.  If we have such a version of Git, use it to
find this information.  If it fails, return an error, but if it simply
prints no values (such as with `GIT_ATTR_NOSYSTEM`), then that means Git
does not consider us to have a system gitattributes file, and in that
case, ignore trying to load that data.
2023-08-24 13:17:27 +00:00
..
gitattr git,t: refactor macro attribute handling 2023-06-01 02:17:36 -07:00
githistory git/githistory/rewriter.go: always complete task 2023-05-26 09:59:22 -07:00
attribs.go git: use git var to find system gitattributes file 2023-08-24 13:17:27 +00:00
config_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
config.go Add a --file option to install and uninstall 2023-05-02 14:11:27 +00:00
filter_process_scanner_test.go git: use pktline repository 2021-07-20 18:37:31 +00:00
filter_process_scanner.go update inline comments to Go v1.19 doc format 2022-09-25 18:15:31 -07:00
filter_process_status.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
git_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
git.go Make track handle backslashes correctly on Unix 2023-08-22 18:54:33 +00:00
ls_files.go Use --sparse parameter for ls-files for performance optimization 2022-11-15 12:29:50 +01:00
ls_tree_scanner_test.go commands/fsck: exit 1 on failed fsck 2021-07-14 18:15:31 +00:00
ls_tree_scanner.go fsck: don't detect symlinks as invalid pointers 2021-10-20 20:51:41 +00:00
object_scanner.go update more comments for catFileBatch() functions 2022-10-31 22:15:22 -07:00
refs_test.go commands,git,lfs: rename left/right RefUpdate vars 2022-02-06 21:32:27 -08:00
refs.go commands,git,lfs: rename left/right RefUpdate vars 2022-02-06 21:32:27 -08:00
rev_list_scanner_test.go git: rename left/right ref args in comments 2022-02-06 21:32:27 -08:00
rev_list_scanner.go subprocess: report errors when finding executables 2022-04-19 09:45:20 -07:00
version.go Set package version to v3 2021-09-02 20:41:08 +00:00