summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:23 (GMT)
commit7589e63648bf5224e186990931b1491f36e10a4b (patch)
treedfd3004e735b69ae91dc08ac4f742f1cb84eae5d /revision.c
parente52c6bbd131f1f4f17b95e28d12ead0c81a8e890 (diff)
parentf8adbec9feaa7a1ab9814db1115826e87033712e (diff)
downloadgit-7589e63648bf5224e186990931b1491f36e10a4b.zip
git-7589e63648bf5224e186990931b1491f36e10a4b.tar.gz
git-7589e63648bf5224e186990931b1491f36e10a4b.tar.bz2
Merge branch 'nd/the-index-final'
The assumption to work on the single "in-core index" instance has been reduced from the library-ish part of the codebase. * nd/the-index-final: cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch read-cache.c: remove the_* from index_has_changes() merge-recursive.c: remove implicit dependency on the_repository merge-recursive.c: remove implicit dependency on the_index sha1-name.c: remove implicit dependency on the_index read-cache.c: replace update_index_if_able with repo_& read-cache.c: kill read_index() checkout: avoid the_index when possible repository.c: replace hold_locked_index() with repo_hold_locked_index() notes-utils.c: remove the_repository references grep: use grep_opt->repo instead of explict repo argument
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/revision.c b/revision.c
index 8f886fe..5c7d3c7 100644
--- a/revision.c
+++ b/revision.c
@@ -1397,7 +1397,7 @@ void add_index_objects_to_pending(struct rev_info *revs, unsigned int flags)
{
struct worktree **worktrees, **p;
- read_index(revs->repo->index);
+ repo_read_index(revs->repo);
do_add_index_objects_to_pending(revs, revs->repo->index, flags);
if (revs->single_worktree)
@@ -1544,7 +1544,7 @@ static void prepare_show_merge(struct rev_info *revs)
head->object.flags |= SYMMETRIC_LEFT;
if (!istate->cache_nr)
- read_index(istate);
+ repo_read_index(revs->repo);
for (i = 0; i < istate->cache_nr; i++) {
const struct cache_entry *ce = istate->cache[i];
if (!ce_stage(ce))
@@ -1603,8 +1603,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot,
if (!*b_name)
b_name = "HEAD";
- if (get_oid_with_context(a_name, oc_flags, &a_oid, a_oc) ||
- get_oid_with_context(b_name, oc_flags, &b_oid, b_oc))
+ if (get_oid_with_context(revs->repo, a_name, oc_flags, &a_oid, a_oc) ||
+ get_oid_with_context(revs->repo, b_name, oc_flags, &b_oid, b_oc))
return -1;
if (!cant_be_filename) {
@@ -1738,7 +1738,7 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi
if (revarg_opt & REVARG_COMMITTISH)
get_sha1_flags |= GET_OID_COMMITTISH;
- if (get_oid_with_context(arg, get_sha1_flags, &oid, &oc))
+ if (get_oid_with_context(revs->repo, arg, get_sha1_flags, &oid, &oc))
return revs->ignore_missing ? 0 : -1;
if (!cant_be_filename)
verify_non_filename(revs->prefix, arg);
@@ -2471,7 +2471,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
struct object_id oid;
struct object *object;
struct object_context oc;
- if (get_oid_with_context(revs->def, 0, &oid, &oc))
+ if (get_oid_with_context(revs->repo, revs->def, 0, &oid, &oc))
diagnose_missing_default(revs->def);
object = get_reference(revs, revs->def, &oid, 0);
add_pending_object_with_mode(revs, object, revs->def, oc.mode);