git-lfs/commands
brian m. carlson d0e950d650
Optimize pushes of multiple refs
When pushing multiple refs, we know any Git objects on the remote side
can be excluded from the objects that refer to LFS objects we need to
push, since if the remote side already has the Git objects, it should
have the corresponding LFS objects as well.

However, when traversing Git objects, we traverse them on a per-ref
basis, which is required since any LFS objects which spawn a batch
request will need the ref to be placed in the batch request as part of
the protocol.

Let's find a list of all the remote sides that exist before traversing
any Git objects, and exclude traversing any of those objects in any
traversal.  As a result, we can traverse far, far fewer objects,
especially when pushing new refs in a large repository.

Note that we exclude the case when the left and right sides are the same
because our code sets them to the same thing in some cases even though
Git does not, so we cannot reason about the values in that case.
2020-01-16 20:20:08 +00:00
..
command_checkout.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
command_clean.go progress,tools: move CopyCallback (and related) to 'tools' 2017-11-22 14:08:33 -08:00
command_clone.go commands: teach pull() to get remote from cfg.Remote() 2017-10-27 16:11:16 -06:00
command_dedup.go Add new command git lfs dedup for file system level deduplication. 2019-08-19 10:44:37 +09:00
command_env.go command/env: ensure we honor lfs.url 2019-01-11 17:22:51 +00:00
command_ext.go update package imports 2016-11-15 10:01:18 -07:00
command_fetch.go Support fetching entire history of specific refs 2019-10-13 01:48:21 +02:00
command_filter_process.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
command_fsck.go Pass environment variables into object scanner 2019-08-15 17:39:32 +00:00
command_install.go command/install: don't warn about lack of root on Windows 2019-04-24 17:28:55 +00:00
command_lock.go commands: sanity-check lock paths 2019-03-14 14:26:21 +00:00
command_locks.go locking: "locks --verify" supports "--cached" 2019-03-28 10:12:41 +01:00
command_logs.go remove reliance on global config filesystem vars 2017-10-18 18:09:33 -06:00
command_ls_files.go Pass environment variables into object scanner 2019-08-15 17:39:32 +00:00
command_migrate_export.go Reset the text attribute on export 2019-11-12 15:18:21 +00:00
command_migrate_import.go tasklog: don't log progress status when stdout is not a tty 2018-11-14 14:35:29 -08:00
command_migrate_info.go Modify logic of 'migrate info' to process extensionless files 2019-01-08 12:44:06 +03:00
command_migrate.go Ensure proper alternate handling with gitobj 2019-08-15 17:39:32 +00:00
command_pointer.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
command_post_checkout.go Update usage info for post-checkout 2018-01-19 21:28:09 -05:00
command_post_commit.go commands: remove any cfg.Remote() calls from Command flags 2017-10-27 15:07:36 -06:00
command_post_merge.go commands: remove any cfg.Remote() calls from Command flags 2017-10-27 15:07:36 -06:00
command_pre_push.go commands: set push remote for pre-push 2019-03-27 21:49:34 +00:00
command_prune.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
command_pull.go Pass environment variables into object scanner 2019-08-15 17:39:32 +00:00
command_push.go commands/command_push.go: set pushRemote 2018-07-20 16:38:39 -07:00
command_smudge.go smudge: ensure custom transfer agent work 2019-08-02 17:23:46 +00:00
command_standalone_file.go Provide support for file URLs via a transfer agent 2019-08-02 17:23:47 +00:00
command_status.go Clarify output shown by git lfs status 2019-12-15 21:59:53 -08:00
command_track.go track: make --filename work with spaces 2019-08-23 14:50:38 +00:00
command_uninstall.go commands/uninstall: add a --skip-repo option 2018-10-17 18:53:04 +00:00
command_unlock.go commands/unlock: always attempt an unlock with --force 2019-03-14 14:26:21 +00:00
command_untrack.go commands/{un,}track: local-prefix agnostic comparison 2018-04-05 10:51:26 -07:00
command_update.go git: remove unused arg 2017-10-25 19:20:35 -06:00
command_version.go lfsapi: extract new lfshttp package 2018-09-11 14:51:29 -07:00
commands_test.go all: expand config.Environment interface to support multiple values per key 2017-04-12 17:29:11 -04:00
commands.go Don't fail if we lack objects the server has 2019-07-15 20:47:04 +00:00
lockverifier.go locking: "locks --verify" supports "--cached" 2019-03-28 10:12:41 +01:00
multiwriter.go tasklog: check for connected tty on the actual writer 2018-11-14 14:35:29 -08:00
path_nix.go commands: osLineEnding() is more descriptive 2017-02-03 17:50:47 -07:00
path_windows.go commands: osLineEnding() is more descriptive 2017-02-03 17:50:47 -07:00
path.go track: use default line endings for core.autocrlf=input 2019-07-16 16:57:21 +00:00
pointers.go each command should open and close a gitscanner just once 2016-11-17 17:22:21 -07:00
pull.go Fix error strings to follow Go guidelines 2019-10-22 17:33:49 +03:00
run.go Fix cobra help command to work properly with newer version of cobra 2019-01-17 21:04:19 +00:00
uploader_test.go commands: extract lockVerifier from uploadContext 2017-11-01 17:35:43 -06:00
uploader.go Optimize pushes of multiple refs 2020-01-16 20:20:08 +00:00