summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-02 18:38:29 -0400
committerJunio C Hamano <gitster@pobox.com>2023-07-17 14:16:05 -0700
commitd9e00621591549cd2d9989d290a7e0c63eadd03b (patch)
treed9ea5e646ec343e66647188e8697c3eac3e41627 /commit.c
parent870eb53ab20e9ff453e3b89b4927c154c2b7211a (diff)
ref-filter: simplify return type of match_points_at
We return the oid that matched, but the sole caller only cares whether we matched anything at all. This is mostly academic, since there's only one caller, but the lifetime of the returned pointer is not immediately clear. Sometimes it points to an oid in a tag struct, which should live forever. And sometimes to the oid passed in, which only lives as long as the each_ref_fn callback we're called from. Simplify this to a boolean return which is more direct and obvious. As a bonus, this lets us avoid the weird pattern of overwriting our "oid" parameter in the loop (since we now only refer to the tagged oid one time, and can just inline the call to get it). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions