Re: [PATCH 05/17] Do not check the same match_pos twice

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

 



On Thu, Aug 23, 2012 at 10:10:30AM +0200, mhagger@xxxxxxxxxxxx wrote:

> From: Michael Haggerty <mhagger@xxxxxxxxxxxx>
> 
> Once a match has been found at match_pos, the entry is zeroed and no
> future attempts will match that entry.  So increment match_pos to
> avoid checking against the zeroed-out entry during the next iteration.

Good catch.

A subtle side effect of this zero-ing (not introduced by your patch, but
something I noticed while re-reading the code) is that we implicitly
eliminate duplicate entries from the list of remote refs. There
shouldn't generally be any duplicates, of course, but I think skipping
them is probably sane.

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