Merge branch 'nd/shallow-deepen'
The existing "git fetch --depth=<n>" option was hard to use correctly when making the history of an existing shallow clone deeper. A new option, "--deepen=<n>", has been added to make this easier to use. "git clone" also learned "--shallow-since=<date>" and "--shallow-exclude=<tag>" options to make it easier to specify "I am interested only in the recent N months worth of history" and "Give me only the history since that version". * nd/shallow-deepen: (27 commits) fetch, upload-pack: --deepen=N extends shallow boundary by N commits upload-pack: add get_reachable_list() upload-pack: split check_unreachable() in two, prep for get_reachable_list() t5500, t5539: tests for shallow depth excluding a ref clone: define shallow clone boundary with --shallow-exclude fetch: define shallow boundary with --shallow-exclude upload-pack: support define shallow boundary by excluding revisions refs: add expand_ref() t5500, t5539: tests for shallow depth since a specific date clone: define shallow clone boundary based on time with --shallow-since fetch: define shallow boundary with --shallow-since upload-pack: add deepen-since to cut shallow repos based on time shallow.c: implement a generic shallow boundary finder based on rev-list fetch-pack: use a separate flag for fetch in deepening mode fetch-pack.c: mark strings for translating fetch-pack: use a common function for verbose printing fetch-pack: use skip_prefix() instead of starts_with() upload-pack: move rev-list code out of check_non_tip() upload-pack: make check_non_tip() clean things up on error upload-pack: tighten number parsing at "deepen" lines ...
This commit is contained in:
@ -219,7 +219,9 @@ out of what the server said it could do with the first 'want' line.
|
||||
|
||||
shallow-line = PKT-LINE("shallow" SP obj-id)
|
||||
|
||||
depth-request = PKT-LINE("deepen" SP depth)
|
||||
depth-request = PKT-LINE("deepen" SP depth) /
|
||||
PKT-LINE("deepen-since" SP timestamp) /
|
||||
PKT-LINE("deepen-not" SP ref)
|
||||
|
||||
first-want = PKT-LINE("want" SP obj-id SP capability-list)
|
||||
additional-want = PKT-LINE("want" SP obj-id)
|
||||
|
@ -179,6 +179,31 @@ This capability adds "deepen", "shallow" and "unshallow" commands to
|
||||
the fetch-pack/upload-pack protocol so clients can request shallow
|
||||
clones.
|
||||
|
||||
deepen-since
|
||||
------------
|
||||
|
||||
This capability adds "deepen-since" command to fetch-pack/upload-pack
|
||||
protocol so the client can request shallow clones that are cut at a
|
||||
specific time, instead of depth. Internally it's equivalent of doing
|
||||
"rev-list --max-age=<timestamp>" on the server side. "deepen-since"
|
||||
cannot be used with "deepen".
|
||||
|
||||
deepen-not
|
||||
----------
|
||||
|
||||
This capability adds "deepen-not" command to fetch-pack/upload-pack
|
||||
protocol so the client can request shallow clones that are cut at a
|
||||
specific revision, instead of depth. Internally it's equivalent of
|
||||
doing "rev-list --not <rev>" on the server side. "deepen-not"
|
||||
cannot be used with "deepen", but can be used with "deepen-since".
|
||||
|
||||
deepen-relative
|
||||
---------------
|
||||
|
||||
If this capability is requested by the client, the semantics of
|
||||
"deepen" command is changed. The "depth" argument is the depth from
|
||||
the current shallow boundary, instead of the depth from remote refs.
|
||||
|
||||
no-progress
|
||||
-----------
|
||||
|
||||
|
Reference in New Issue
Block a user