Re: [PATCH 05/23] refs_ref_iterator_begin(): don't check prefixes redundantly

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

 



On Wed, May 17, 2017 at 02:05:28PM +0200, Michael Haggerty wrote:

> The backend already takes care of the prefix. By passing the prefix
> again to `prefix_ref_iterator`, we were forcing that iterator to do
> redundant prefix comparisons. So set it to the empty string.

Hmm. So givne a refname like "refs/heads/foo" and a prefix like
"refs/heads/", would we trim down to "foo" and then further try to
remove "refs/heads" again?

That sounds like it's not just redundant, but a bug (albeit one that is
very unlikely to come up, unless you have "refs/heads/refs/heads/foo").

Or am I misunderstanding?

-Peff



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