summaryrefslogtreecommitdiff
path: root/builtin/cat-file.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 /builtin/cat-file.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 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index cebc6d7..8487cd7 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -3,6 +3,7 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "config.h"
#include "builtin.h"
@@ -73,7 +74,8 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
if (unknown_type)
flags |= OBJECT_INFO_ALLOW_UNKNOWN_TYPE;
- if (get_oid_with_context(obj_name, GET_OID_RECORD_PATH,
+ if (get_oid_with_context(the_repository, obj_name,
+ GET_OID_RECORD_PATH,
&oid, &obj_context))
die("Not a valid object name %s", obj_name);
@@ -382,7 +384,8 @@ static void batch_one_object(const char *obj_name,
int flags = opt->follow_symlinks ? GET_OID_FOLLOW_SYMLINKS : 0;
enum get_oid_result result;
- result = get_oid_with_context(obj_name, flags, &data->oid, &ctx);
+ result = get_oid_with_context(the_repository, obj_name,
+ flags, &data->oid, &ctx);
if (result != FOUND) {
switch (result) {
case MISSING_OBJECT: