interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / git-backfill.adoc

95 lines · 3638 bytes Raw Blame History
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] [--[no-]include-edges] [<revision-range>]
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 below.
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
66`--include-edges`::
67`--no-include-edges`::
68 Include blobs from boundary commits in the backfill. Useful in
69 preparation for commands like `git log -p A..B` or `git replay
70 --onto TARGET A..B`, where A..B normally excludes A but you need
71 the blobs from A as well. `--include-edges` is the default.
72
73`<revision-range>`::
74 Backfill only blobs reachable from commits in the specified
75 revision range. When no _<revision-range>_ is specified, it
76 defaults to `HEAD` (i.e. the whole history leading to the
77 current commit). For a complete list of ways to spell
78 _<revision-range>_, see the "Specifying Ranges" section of
79 linkgit:gitrevisions[7].
80+
81You may also use commit-limiting options understood by
82linkgit:git-rev-list[1] such as `--first-parent`, `--since`, or pathspecs.
83+
84Most `--filter=<spec>` options don't work with the purpose of
85`git backfill`, but the `sparse:<oid>` filter is integrated to provide a
86focused set of paths to download, distinct from the `--sparse` option.
87
88SEE ALSO
89--------
90linkgit:git-clone[1],
91linkgit:git-rev-list[1]
92
93GIT
94---
95Part of the linkgit:git[1] suite