On Thu, May 15, 2025 at 01:11:44PM +0000, Johannes Schindelin via GitGitGadget wrote: > As pointed out by CodeQL, `branch_get()` may return `NULL`, in which > case `branch_has_merge_config()` would return early, but we can even > avoid enumerating the refs prefixes in that case, saving even more CPU > cycles. I am not sure how this patch changes anything with respect to CPU. If branch is NULL, then branch_has_merge_config(branch) will always return false. I think this is just an issue that CodeQL is not looking inside branch_has_merge_config(), and thus does not realize we will never hit the rest of the short-circuit conditional (let alone the body) in that case? Still may be worth dealing with, but it makes me a little sad to have to add an extra redundant check (one place is not a big deal, but as a general pattern). -Peff