Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'object-name.c')
-rw-r--r--object-name.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/object-name.c b/object-name.c
index ce973e0150..53f9d359ee 100644
--- a/object-name.c
+++ b/object-name.c
@@ -398,8 +398,10 @@ static int show_ambiguous_object(const struct object_id *oid, void *data)
if (commit) {
struct pretty_print_context pp = {0};
pp.date_mode.type = DATE_SHORT;
- format_commit_message(commit, "%ad", &date, &pp);
- format_commit_message(commit, "%s", &msg, &pp);
+ repo_format_commit_message(the_repository, commit,
+ "%ad", &date, &pp);
+ repo_format_commit_message(the_repository, commit,
+ "%s", &msg, &pp);
}
/*
@@ -1040,7 +1042,7 @@ static enum get_oid_result get_parent(struct repository *r,
if (ret)
return ret;
commit = lookup_commit_reference(r, &oid);
- if (parse_commit(commit))
+ if (repo_parse_commit(r, commit))
return MISSING_OBJECT;
if (!idx) {
oidcpy(result, &commit->object.oid);
@@ -1074,7 +1076,7 @@ static enum get_oid_result get_nth_ancestor(struct repository *r,
return MISSING_OBJECT;
while (generation--) {
- if (parse_commit(commit) || !commit->parents)
+ if (repo_parse_commit(r, commit) || !commit->parents)
return MISSING_OBJECT;
commit = commit->parents->item;
}
@@ -1365,10 +1367,10 @@ static int get_oid_oneline(struct repository *r,
commit = pop_most_recent_commit(&list, ONELINE_SEEN);
if (!parse_object(r, &commit->object.oid))
continue;
- buf = get_commit_buffer(commit, NULL);
+ buf = repo_get_commit_buffer(r, commit, NULL);
p = strstr(buf, "\n\n");
matches = negative ^ (p && !regexec(&regex, p + 2, 0, NULL, 0));
- unuse_commit_buffer(commit, buf);
+ repo_unuse_commit_buffer(r, commit, buf);
if (matches) {
oidcpy(oid, &commit->object.oid);
@@ -1670,7 +1672,8 @@ void strbuf_branchname(struct strbuf *sb, const char *name, unsigned allowed)
struct interpret_branch_name_options options = {
.allowed = allowed
};
- int used = interpret_branch_name(name, len, sb, &options);
+ int used = repo_interpret_branch_name(the_repository, name, len, sb,
+ &options);
if (used < 0)
used = 0;
@@ -1723,7 +1726,7 @@ int get_oidf(struct object_id *oid, const char *fmt, ...)
strbuf_vaddf(&sb, fmt, ap);
va_end(ap);
- ret = get_oid(sb.buf, oid);
+ ret = repo_get_oid(the_repository, sb.buf, oid);
strbuf_release(&sb);
return ret;