From 69020d034b75a7cd198c7351219d07ee6926fe59 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Wed, 14 Aug 2024 10:31:28 +0000 Subject: commit: add gentle reference lookup method The lookup_commit_reference_by_name() method uses lookup_commit_reference() without an option to use lookup_commit_reference_gently(). Create a gentle version of the method so it can be used in locations where non-commits may be found but error messages should be silenced. Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- commit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index d62b1d93f9..0e5fce543c 100644 --- a/commit.h +++ b/commit.h @@ -81,6 +81,8 @@ struct commit *lookup_commit_reference_gently(struct repository *r, const struct object_id *oid, int quiet); struct commit *lookup_commit_reference_by_name(const char *name); +struct commit *lookup_commit_reference_by_name_gently(const char *name, + int quiet); /* * Look up object named by "oid", dereference tag as necessary, -- cgit 1.2.3-korg