git-lfs/tq
brian m. carlson a0065c0a48
tq: avoid spawning SSH process needlessly
When a user invokes `git archive` with LFS files, `git lfs
filter-process` is invoked to smudge the LFS files.  However, currently
when we instantiate the manifest object as part of that, an attempt is
made to connect to the remote using SSH, which we don't want to do
unless necessary.  For example, if the user already has all the files
locally, the network connection is needless and serves only to waste
resources.

In the previous commit, we made our manifest an abstract interface with
a single implementing type: a concrete manifest.  Now, introduce a lazy
manifest, which can upgrade to a concrete manifest but doesn't
instantiate one until that happens.  This allows us to instantiate a
manifest without making the SSH connection, and we can delay the SSH
connection until it's really needed, if at all.

Add a test for this case as well.
2023-03-28 15:21:58 +00:00
..
schemas tq,lfsapi/ssh: convert int64 to int 2017-04-05 14:46:45 -06:00
adapterbase.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
api_test.go tq/api_test.go: remove unneeded translations 2022-01-29 22:32:57 -08:00
api.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
basic_download.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
basic_upload.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
custom_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
custom.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
errors_test.go tq/errors: implement MalformedObjectError 2017-03-24 14:36:59 -06:00
errors.go tq: make strings translatable 2022-01-18 17:38:25 +00:00
manifest_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
manifest.go tq: avoid spawning SSH process needlessly 2023-03-28 15:21:58 +00:00
meter.go avoid extra message format parsing where possible 2022-01-29 22:32:58 -08:00
ssh.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
transfer_queue_test.go tq: add exponential backoff for retries 2020-04-15 14:10:16 -07:00
transfer_queue.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
transfer_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
transfer.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
tus_upload.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
verify_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
verify.go Set package version to v3 2021-09-02 20:41:08 +00:00