Re: [PATCH 3/3] write_head_info(): handle "extra refs" locally

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

 



mhagger@xxxxxxxxxxxx writes:

> From: Michael Haggerty <mhagger@xxxxxxxxxxxx>
>
> The old code basically did:
>
>      generate array of SHA1s for alternate refs
>      for each unique SHA1 in array:
>          add_extra_ref(".have", sha1)
>      for each ref (including real refs and extra refs):
>          show_ref(refname, sha1)
>
> But there is no need to stuff the alternate refs in extra_refs; we can
> call show_ref() directly when iterating over the array, then handle
> real refs separately.  So change the code to:
>
>      generate array of SHA1s for alternate refs
>      for each unique SHA1 in array:
>          show_ref(".have", sha1)
>      for each ref (this now only includes real refs):
>          show_ref(refname, sha1)

This updated logic should be equivalent to the old one as long as nobody
else called add_extra_ref() before we come to write_head_info() function,
which should hold true.

The entire series looks good. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]