Re: [PATCH v5 08/12] bundle: properly clear all revision flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Derrick Stolee via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Derrick Stolee <derrickstolee@xxxxxxxxxx>
>
> The verify_bundle() method checks two things for a bundle's
> prerequisites:
>
>  1. Are these objects in the object store?
>  2. Are these objects reachable from our references?
>
> In this second question, multiple uses of verify_bundle() in the same
> process can report an invalid bundle even though it is correct. The
> reason is due to not clearing all of the commit marks on the commits
> previously walked.
> ...
> Moving this loop to the cleanup step alone would cause a segfault when
> running 'git bundle verify' outside of a repository, but this is because
> of that error condition using "goto cleanup" when returning is perfectly
> safe. Nothing has been initialized at that point, so we can return
> immediately without causing any leaks.

Nicely analyzed.  The implementation clearly follows the design
described above.  Much better than the previous iteration.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux