From 12cb1c10a64170a5d600dd1c6c8abfeec105fb6b Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Tue, 28 Mar 2023 15:58:54 +0200 Subject: cocci: apply the "refs.h" part of "the_repository.pending" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the part of "the_repository.pending.cocci" pertaining to "refs.h". Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin/log.c') diff --git a/builtin/log.c b/builtin/log.c index 3dde77bde2..acf3faecd8 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1204,7 +1204,8 @@ static char *find_branch_name(struct rev_info *rev) return NULL; ref = rev->cmdline.rev[positive].name; tip_oid = &rev->cmdline.rev[positive].item->oid; - if (dwim_ref(ref, strlen(ref), &branch_oid, &full_ref, 0) && + if (repo_dwim_ref(the_repository, ref, strlen(ref), &branch_oid, + &full_ref, 0) && skip_prefix(full_ref, "refs/heads/", &v) && oideq(tip_oid, &branch_oid)) branch = xstrdup(v); -- cgit 1.2.3-korg