From: Junio C Hamano Date: Wed, 16 Jul 2025 15:39:52 GMT Subject: Re: [PATCH v3 3/4] refs: selectively set prefix in the seek functions Message-ID: In-Reply-To: Karthik Nayak writes: > Let's say a user is iterating with a prefix set to 'refs/heads/', this > would iterate over all the refs with that prefix. But mid-way the user > realizes that they only care about 'refs/heads/feature/' prefix and they > ask the iterator to set that as the prefix. But is that user who changes their mind in the middle "seeking"? It is more like "I am abandoning the enumeration I started earlier over refs/heads/, and I want a different enumeration over refs/heads/feature/, but because I know the implementation detail that abandoning an iterator and creating another is more expensive, let me reuse the one in use to repurpose it". I wouldn't call it "seeking"; it sounds more like "resetting".