git-lfs/lfs
brian m. carlson 00623425a2
tq: make Manifest an interface
Right now, any time we instantiate a Manifest object, we create an API
client, and when we create the API client, if we're using SSH, we try to
make a connection to the server.  However, we often instantiate a
Manifest object when performing various functionality such as smudging
data, which means that when a user creates an archive locally, they can
be prompted for an SSH password, which is undesirable.

Let's take a first step to fixing this by making Manifest an interface.
Right now, it has one concrete version, a concreteManifest, which can be
used to access the internals, and we provide methods to upgrade it from
the interface to the concrete type and determine whether it's upgraded
or not.  We attempt to upgrade it any time we need to access its
internals.  In the future, we'll also offer a lazyManifest, which is
lazy and will only instantiate the concreteManifest inside when we
attempt to upgrade it to the latter.  But for now, only implement the
concreteManifest to make it clearer what's changing.

Similarly, we make our TransferQueue upgradable so that we don't
upgrade its Manifest right away.

In both cases, we'll want to use the lazyManifest to delay the
instantiation of the API client (and hence the starting of the SSH
connection) in a future commit.
2023-03-23 16:55:57 +00:00
..
attribute.go avoid extra message format parsing where possible 2022-01-29 22:32:58 -08:00
config_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
config.go Set package version to v3 2021-09-02 20:41:08 +00:00
diff_index_scanner.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
extension.go subprocess: report errors when finding executables 2022-04-19 09:45:20 -07:00
gitfilter_clean.go Set package version to v3 2021-09-02 20:41:08 +00:00
gitfilter_smudge.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
gitfilter.go commands,git,lfs: rename left/right RefUpdate vars 2022-02-06 21:32:27 -08:00
gitscanner_catfilebatch.go update comments for catFileBatch() functions 2022-10-31 12:31:37 -07:00
gitscanner_catfilebatchcheck.go use backticks around commands in messages 2022-01-29 22:35:10 -08:00
gitscanner_catfilebatchcheckscanner_test.go lfs: teach gitscanner how to emit lockable files that aren't lfs objects 2017-02-16 16:52:40 -07:00
gitscanner_index.go Set package version to v3 2021-09-02 20:41:08 +00:00
gitscanner_log.go lfs,t: use prune exclude filter on previous SHAs 2022-04-26 10:16:07 -07:00
gitscanner_pointerscanner_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
gitscanner_refs.go lfs/gitscanner*.go: update scan function comments 2022-02-06 21:32:27 -08:00
gitscanner_remotes.go Set package version to v3 2021-09-02 20:41:08 +00:00
gitscanner_tree.go update more comments for catFileBatch() functions 2022-10-31 22:15:22 -07:00
gitscanner.go commands,lfs,t: scan refs by tree when pruning 2022-04-27 20:25:13 -07:00
hook.go hooks: mention core.hookspath instead of just .git/hooks 2023-01-05 17:08:25 +00:00
lfs_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
lfs.go tq: make Manifest an interface 2023-03-23 16:55:57 +00:00
pointer_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
pointer.go make additional message strings translatable 2022-01-29 22:36:19 -08:00
scanner_git_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
scanner_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
scanner.go update comments for catFileBatch() functions 2022-10-31 12:31:37 -07:00
util_generic.go Update formatting for Go 1.17 2021-08-17 20:24:58 +02:00
util_test.go Set package version to v3 2021-09-02 20:41:08 +00:00
util.go make additional message strings translatable 2022-01-29 22:36:19 -08:00