diff options
author | Derrick Stolee <derrickstolee@github.com> | 2024-08-14 12:31:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-14 19:10:05 +0200 |
commit | 69020d034b75a7cd198c7351219d07ee6926fe59 (patch) | |
tree | 90647b7e547cb56cc5c2c8f266540655e6628144 /commit.h | |
parent | commit-reach: add get_branch_base_for_tip (diff) | |
download | git-69020d034b75a7cd198c7351219d07ee6926fe59.tar.xz git-69020d034b75a7cd198c7351219d07ee6926fe59.zip |
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 <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |