Skip to content

Commit

Permalink
Merge branch 'jc/maint-verify-objects-remove-pessimism'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Mar 16, 2012
2 parents 9721d2f + d21c463 commit c3117b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connected.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
/*
* If we feed all the commits we want to verify to this command
*
* $ git rev-list --verify-objects --stdin --not --all
* $ git rev-list --objects --stdin --not --all
*
* and if it does not error out, that means everything reachable from
* these commits locally exists and is connected to some of our
* existing refs.
* these commits locally exists and is connected to our existing refs.
* Note that this does _not_ validate the individual objects.
*
* Returns 0 if everything is connected, non-zero otherwise.
*/
int check_everything_connected(sha1_iterate_fn fn, int quiet, void *cb_data)
{
struct child_process rev_list;
const char *argv[] = {"rev-list", "--verify-objects",
const char *argv[] = {"rev-list", "--objects",
"--stdin", "--not", "--all", NULL, NULL};
char commit[41];
unsigned char sha1[20];
Expand Down

0 comments on commit c3117b2

Please sign in to comment.