{"thread":{"id":"26620","subject":"False alarms from git-fsck(1) about missing commits/trees pushed after the run started","startedAt":"2011-02-28T12:38:56Z","lastAt":"2011-02-28T16:23:56Z","messageCount":2,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"162433","messageId":"AANLkTimrgepw4r=z5na-d74XY67QuRRgFepWZh87xrCq@mail.gmail.com","threadId":"26620","inReplyTo":null,"subject":"False alarms from git-fsck(1) about missing commits/trees pushed after the run started","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-02-28T12:38:56Z","receivedAt":"2011-02-28T12:38:56Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"I ran `git-fsck --full --verbose` on a bare Git repository which users\npush to (over ssh).\n\nIt reports things like this:\n\n    missing commit c7836745b13ce838439b3705d3c5c93bc0add6a6\n    missing tree ef59d2bee486b6af5ae36eb9ff2e9de0d52f37ab\n    missing commit 786315c755ac91d3a1ffc3d92679dda961035617\n\nBut actually these things aren't missing. They were just pushed to the\nrepo after the fsck run started.\n\nIs this a known limitation of git-fsck, is it documented anywhere? If\nit's not supposed to do this maybe there's a race condition somewhere\nin it.\n"},{"id":"162448","messageId":"7vbp1wjffn.fsf@alter.siamese.dyndns.org","threadId":"26620","inReplyTo":"AANLkTimrgepw4r=z5na-d74XY67QuRRgFepWZh87xrCq@mail.gmail.com","subject":"Re: False alarms from git-fsck(1) about missing commits/trees pushed after the run started","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-02-28T16:23:56Z","receivedAt":"2011-02-28T16:23:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> But actually these things aren't missing. They were just pushed to the\n> repo after the fsck run started.\n>\n> Is this a known limitation of git-fsck,...\n\nYes.\n\nWe validate the contents of the objects we find in the repository (we do\nthis by directly visiting .git/objects/??/ and .git/objects/packs/\ndirectories and validate the contents of even unreachable objects), mark\ntheir existence while doing so, and then traverse the reachability DAG\nfrom refs to find dangling & missing.\n\nIt always is possible to have objects we mark as reachable in the second\nphase that are not marked as existing in the first phase if you are\nactively adding objects to the repository (e.g. by pushing into it, by\nfetching into it, or by running \"git add\") while running fsck, as these\nnew objects may not exist during the first phase but then later can become\nreachable by ref updates.\n\n> ..., is it documented anywhere?\n\nI don't know for sure but I doubt it; please make it so.\n"}]}