git-lfs/git
brian m. carlson 263b434e97
config: optionally read .lfsconfig from the repository
Currently we only read .lfsconfig from the working tree.  This is better
than nothing, but it means that if there's an LFS file that starts with
a name earlier than .lfsconfig, we won't read the proper config file,
and we won't use any LFS remote URLs that are located in that file.

If the file is missing, let's additionally read from the index, if
there's a working tree, and then from HEAD.  If the repository is bare,
let's just read from HEAD.  This is very similar to what Git does for
.gitmodules.

It does, however, differ in one significant way: Git will read from the
index first if it's doing a checkout, since that might have newer
information.  We don't do that here, since it's not totally clear that
we can articulate all the cases where that occurs in Git LFS, but we
explicitly allow for the possibility of changing the behavior in the
future and document the feature accordingly.

We no longer read the file .lfsconfig from a bare repository, but that
we did this in the first place was very questionable and pretty clearly
a bug, so it's intentional that we no longer do.
2020-08-06 20:04:00 +00:00
..
gitattr Support SHA-256 repositories 2020-07-29 20:53:44 +00:00
githistory Support SHA-256 repositories 2020-07-29 20:53:44 +00:00
attribs.go Tidy files 2019-10-02 19:17:28 +00:00
config_test.go git: provide a read-only configuration object 2018-10-26 15:27:54 +00:00
config.go config: optionally read .lfsconfig from the repository 2020-08-06 20:04:00 +00:00
filter_process_scanner_test.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
filter_process_scanner.go git: remove low value debug message 2017-10-27 09:51:45 -06:00
filter_process_status.go git: introduce type 'FilterProcessStatus' 2017-08-24 18:28:50 -04:00
git_test.go git: add a function to check for a zero object ID 2020-07-29 20:53:43 +00:00
git.go Support SHA-256 repositories 2020-07-29 20:53:44 +00:00
ls_files.go Tidy files 2019-10-02 19:17:28 +00:00
object_scanner.go Support SHA-256 repositories 2020-07-29 20:53:44 +00:00
pkt_line_reader_test.go filter-process: fix reading 1024 byte files 2016-11-22 12:21:48 +01:00
pkt_line_reader.go filter-process: avoid hang when using git hash-object --stdin 2019-11-04 19:55:45 +00:00
pkt_line_test.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
pkt_line_writer_test.go git: teach *PktlineWriter.Flush() to respond to nil receiver 2017-08-02 13:26:38 -06:00
pkt_line_writer.go git: teach *PktlineWriter.Flush() to respond to nil receiver 2017-08-02 13:26:38 -06:00
pkt_line.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
refs_test.go git: port over existing commands.refUpdate tests 2018-01-05 15:18:17 -07:00
refs.go git: remove unnecessary debug trace messages 2018-01-17 11:06:23 -07:00
rev_list_scanner_test.go git: avoid "bad object" messages when force-pushing 2020-04-23 15:13:31 +00:00
rev_list_scanner.go git: support SHA-256 in rev-list scanner 2020-07-29 20:53:43 +00:00
version.go git/version.go: replace sync.Mutex usage with sync.Once 2019-01-23 15:42:32 -08:00