diff options
author | Terry Parker <tparker@google.com> | 2016-08-04 11:14:33 -0700 |
---|---|---|
committer | Terry Parker <tparker@google.com> | 2016-08-05 17:27:30 -0700 |
commit | e426aa8b908b528ab16107d92287050fd26ed047 (patch) | |
tree | f02c1a64be0b380c328e938f83dd92ac6a53b9fe /org.eclipse.jgit.ant | |
parent | d385a7a5e5cacd875da4301ddeb46a7c56a725fa (diff) | |
download | jgit-e426aa8b908b528ab16107d92287050fd26ed047.tar.gz jgit-e426aa8b908b528ab16107d92287050fd26ed047.zip |
Shallow fetch/clone: Make --depth mean the total history depth
cgit changed the --depth parameter to mean the total depth of history
rather than the depth of ancestors to be returned [1]. JGit still uses
the latter meaning, so update it to match cgit.
depth=0 still means a non-shallow clone. depth=1 now means only the
wants rather than the wants and their direct parents.
This is accomplished by changing the semantic meaning of "depth" in
UploadPack and PackWriter to mean the total depth of history desired,
while keeping "depth" in DepthWalk.{RevWalk,ObjectWalk} to mean
the depth of traversal. Thus UploadPack and PackWriter always
initialize their DepthWalks with "depth-1".
[1] upload-pack: fix off-by-one depth calculation in shallow clone
https://code.googlesource.com/git/+/682c7d2f1a2d1a5443777237450505738af2ff1a
Change-Id: I87ed3c0f56c37e3491e367a41f5e555c4207ff44
Signed-off-by: Terry Parker <tparker@google.com>
Diffstat (limited to 'org.eclipse.jgit.ant')
0 files changed, 0 insertions, 0 deletions