Git fork
at reftables-rust 72 lines 2.6 kB view raw
1git-backfill(1) 2=============== 3 4NAME 5---- 6git-backfill - Download missing objects in a partial clone 7 8 9SYNOPSIS 10-------- 11[synopsis] 12git backfill [--min-batch-size=<n>] [--[no-]sparse] 13 14DESCRIPTION 15----------- 16 17Blobless partial clones are created using `git clone --filter=blob:none` 18and then configure the local repository such that the Git client avoids 19downloading blob objects unless they are required for a local operation. 20This initially means that the clone and later fetches download reachable 21commits and trees but no blobs. Later operations that change the `HEAD` 22pointer, such as `git checkout` or `git merge`, may need to download 23missing blobs in order to complete their operation. 24 25In the worst cases, commands that compute blob diffs, such as `git blame`, 26become very slow as they download the missing blobs in single-blob 27requests to satisfy the missing object as the Git command needs it. This 28leads to multiple download requests and no ability for the Git server to 29provide delta compression across those objects. 30 31The `git backfill` command provides a way for the user to request that 32Git downloads the missing blobs (with optional filters) such that the 33missing blobs representing historical versions of files can be downloaded 34in batches. The `backfill` command attempts to optimize the request by 35grouping blobs that appear at the same path, hopefully leading to good 36delta compression in the packfile sent by the server. 37 38In this way, `git backfill` provides a mechanism to break a large clone 39into smaller chunks. Starting with a blobless partial clone with `git 40clone --filter=blob:none` and then running `git backfill` in the local 41repository provides a way to download all reachable objects in several 42smaller network calls than downloading the entire repository at clone 43time. 44 45By default, `git backfill` downloads all blobs reachable from the `HEAD` 46commit. This set can be restricted or expanded using various options. 47 48THIS COMMAND IS EXPERIMENTAL. ITS BEHAVIOR MAY CHANGE IN THE FUTURE. 49 50 51OPTIONS 52------- 53 54`--min-batch-size=<n>`:: 55 Specify a minimum size for a batch of missing objects to request 56 from the server. This size may be exceeded by the last set of 57 blobs seen at a given path. The default minimum batch size is 58 50,000. 59 60`--sparse`:: 61`--no-sparse`:: 62 Only download objects if they appear at a path that matches the 63 current sparse-checkout. If the sparse-checkout feature is enabled, 64 then `--sparse` is assumed and can be disabled with `--no-sparse`. 65 66SEE ALSO 67-------- 68linkgit:git-clone[1]. 69 70GIT 71--- 72Part of the linkgit:git[1] suite