summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-25 16:41:15 +0900
committerJunio C Hamano <gitster@pobox.com>2019-04-25 16:41:15 +0900
commita5e4be2f683f48a3edbbf9375af923a8256efb81 (patch)
tree500ed45266468c4984a45d2ee9adea053695b48e /commit.h
parentf3c19f85c5aad6d3c8b56c3b2f3dfbf00852c8c4 (diff)
parent93b4405ffe4ad9308740e7c1c71383bfc369baaa (diff)
Merge branch 'ab/commit-graph-fixes'
Code cleanup with more careful error checking before using data read from the commit-graph file. * ab/commit-graph-fixes: commit-graph: improve & i18n error messages commit-graph write: don't die if the existing graph is corrupt commit-graph verify: detect inability to read the graph commit-graph: don't pass filename to load_commit_graph_one_fd_st() commit-graph: don't early exit(1) on e.g. "git status" commit-graph: fix segfault on e.g. "git status" commit-graph tests: test a graph that's too small commit-graph tests: split up corrupt_graph_and_verify()
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 42728c2906..5d33477e78 100644
--- a/commit.h
+++ b/commit.h
@@ -89,6 +89,12 @@ static inline int repo_parse_commit(struct repository *r, struct commit *item)
{
return repo_parse_commit_gently(r, item, 0);
}
+
+static inline int parse_commit_no_graph(struct commit *commit)
+{
+ return repo_parse_commit_internal(the_repository, commit, 0, 0);
+}
+
#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
#define parse_commit_internal(item, quiet, use) repo_parse_commit_internal(the_repository, item, quiet, use)
#define parse_commit_gently(item, quiet) repo_parse_commit_gently(the_repository, item, quiet)