From: Kristofer Karlsson Date: Sat, 06 Jun 2026 17:24:07 GMT Subject: Re: [PATCH] prio-queue: fold lazy_queue into prio_queue for automatic get+put fusion Message-ID: In-Reply-To: Junio C Hamano writes: > How can we be sure that all such users of prio_queue has been > converted? Are direct references to .nr member, outside of the > prio-queue.c implementation, all now suspect? You're right, and the patch is thus broken in its current state. I did a rename of .nr to ._nr on the branch and rebuilt -- that immediately found several callers I missed: - object-name.c: get_oid_oneline() (like you also found) - fetch-pack.c: mark_recent_complete_commits() - builtin/last-modified.c: last_modified_run() - path-walk.c: walk_objects_by_path() - commit-reach.c: queue_has_nonstale() The describe.c and show-branch.c callers already compensate for get_pending in their iteration bounds, but they still reach into .nr directly. > Perhaps the member should be renamed to catch in-flight topics > that add more users of prio-queue that peek into the .nr member, > or something like that. Agreed, that's the right fix. I looked for existing ways of marking fields as private, internal or hidden but the only thing I found was the convention of using a code comment: /* for internal use only */ I will apply a rename and submit a v2. Perhaps something like nr_internal to make it look less like a public API.