Commit b18d1a0
pack-objects: allow --shallow and --path-walk
There does not appear to be anything particularly incompatible about the
--shallow and --path-walk options of 'git pack-objects'. If shallow
commits are to be handled differently, then it is by the revision walk
that defines the commit set and which are interesting or uninteresting.
However, before the previous change, a trivial removal of the warning
would cause a failure in t5500-fetch-pack.sh when
GIT_TEST_PACK_PATH_WALK is enabled. The shallow fetch would provide more
objects than we desired, due to some incorrect behavior of the path-walk
API, especially around walking uninteresting objects.
To also cover the symmetrical case of pushing from a shallow clone, add
a new test to t5538-push-shallow.sh that confirms the correct behavior
of pushing only the new object. This works to validate both the
--path-walk and --no-path-walk case when toggling the
GIT_TEST_PACK_PATH_WALK environment variable. This test would have
failed in the --path-walk case if we created it before the previous
change.
Signed-off-by: Derrick Stolee <stolee@gmail.com>1 parent ff6c4d7 commit b18d1a0
2 files changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
4477 | 4478 | | |
4478 | 4479 | | |
4479 | 4480 | | |
| 4481 | + | |
4480 | 4482 | | |
4481 | 4483 | | |
4482 | 4484 | | |
| |||
4678 | 4680 | | |
4679 | 4681 | | |
4680 | 4682 | | |
4681 | | - | |
4682 | 4683 | | |
4683 | 4684 | | |
4684 | 4685 | | |
| |||
4866 | 4867 | | |
4867 | 4868 | | |
4868 | 4869 | | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
4872 | | - | |
4873 | 4870 | | |
4874 | 4871 | | |
4875 | 4872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
126 | 139 | | |
0 commit comments