Skip to content

Commit c3117b2

Browse files
committed
Merge branch 'jc/maint-verify-objects-remove-pessimism'
The code to validate the history connectivity between old refs and new refs used by fetch and receive-pack, introduced in 1.7.8, was grossly inefficient and unnecessarily tried to re-validate integrity of individual objects. This essentially reverts that performance regression. * jc/maint-verify-objects-remove-pessimism: fetch/receive: remove over-pessimistic connectivity check
2 parents 9721d2f + d21c463 commit c3117b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

connected.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
/*
77
* If we feed all the commits we want to verify to this command
88
*
9-
* $ git rev-list --verify-objects --stdin --not --all
9+
* $ git rev-list --objects --stdin --not --all
1010
*
1111
* and if it does not error out, that means everything reachable from
12-
* these commits locally exists and is connected to some of our
13-
* existing refs.
12+
* these commits locally exists and is connected to our existing refs.
13+
* Note that this does _not_ validate the individual objects.
1414
*
1515
* Returns 0 if everything is connected, non-zero otherwise.
1616
*/
1717
int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data)
1818
{
1919
struct child_process rev_list;
20-
const char *argv[] = {"rev-list", "--verify-objects",
20+
const char *argv[] = {"rev-list", "--objects",
2121
"--stdin", "--not", "--all", NULL, NULL};
2222
char commit[41];
2323
unsigned char sha1[20];

0 commit comments

Comments
 (0)