git-lfs/commands
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
..
command_checkout.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_clean.go commands,lfs*: remove most newlines from messages 2022-01-29 22:32:58 -08:00
command_clone.go subprocess: report errors when finding executables 2022-04-19 09:45:20 -07:00
command_dedup.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_env.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
command_ext.go commands/command_ext.go: translate ext header only 2022-01-29 22:32:57 -08:00
command_fetch.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_filter_process.go Support for multiple remotes to solve issue #3835 2022-07-26 16:38:44 +02:00
command_fsck.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_install.go Add a --file option to install and uninstall 2023-05-02 14:11:27 +00:00
command_lock.go locks: ensure local locks are synced on error 2023-02-13 21:02:48 +00:00
command_locks.go commands,git,lfs: rename left/right RefUpdate vars 2022-02-06 21:32:27 -08:00
command_logs.go commands/logs: make strings translatable 2022-01-18 17:03:27 +00:00
command_ls_files.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_merge_driver.go Add a merge driver 2022-05-10 17:05:15 +00:00
command_migrate_export.go commands: use defer to always close tasks 2023-05-26 16:15:21 -07:00
command_migrate_import.go Merge branch 'main' into extra-git-string-translations 2022-01-31 11:41:17 -08:00
command_migrate_info.go Merge branch 'main' into extra-git-string-translations 2022-01-31 11:41:17 -08:00
command_migrate.go commands: use defer to always close tasks 2023-05-26 16:15:21 -07:00
command_pointer.go avoid extra message format parsing where possible 2022-01-29 22:32:58 -08:00
command_post_checkout.go update inline comments to Go v1.19 doc format 2022-09-25 18:15:31 -07:00
command_post_commit.go commands/post-checkout: make strings translatable 2022-01-18 17:03:37 +00:00
command_post_merge.go commands/post-merge: make strings translatable 2022-01-18 17:03:37 +00:00
command_pre_push.go update inline comments to Go v1.19 doc format 2022-09-25 18:15:31 -07:00
command_prune.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_pull.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_push.go push: don't allow empty list of refs 2023-07-24 17:22:53 +00:00
command_smudge.go commands,t: gitignore matching for fetch filters 2022-04-27 22:13:46 -07:00
command_standalone_file.go Set package version to v3 2021-09-02 20:41:08 +00:00
command_status.go commands,lfs: drop GitScanner Close() method 2023-06-07 15:57:35 -07:00
command_track.go git: use git var to find system gitattributes file 2023-08-24 13:17:27 +00:00
command_uninstall.go Add a --file option to install and uninstall 2023-05-02 14:11:27 +00:00
command_unlock.go Added test 2023-06-07 09:01:07 +02:00
command_untrack.go Move trimCurrentPrefix to tools 2023-03-20 19:37:24 +00:00
command_update.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
command_version.go Set package version to v3 2021-09-02 20:41:08 +00:00
commands_test.go add refs/stash and tests 2022-06-14 20:36:19 -07:00
commands.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
lockverifier.go locks: print warning about locking API to standard error 2023-04-26 20:55:37 +00:00
multiwriter.go tasklog: check for connected tty on the actual writer 2018-11-14 14:35:29 -08:00
path_nix.go Update formatting for Go 1.17 2021-08-17 20:24:58 +02:00
path_windows.go update inline comments to Go v1.19 doc format 2022-09-25 18:15:31 -07:00
path.go Move trimCurrentPrefix to tools 2023-03-20 19:37:24 +00:00
pointers.go Set package version to v3 2021-09-02 20:41:08 +00:00
pull.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
run.go commands/run.go: hide descriptions in completions 2023-07-17 13:41:48 -07:00
uploader_test.go commands: extract lockVerifier from uploadContext 2017-11-01 17:35:43 -06:00
uploader.go commands,lfs: simplify GitScanner upload setup 2023-06-07 15:57:35 -07:00