diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-04 22:33:32 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-04 22:33:32 +0100 |
commit | 3b2f8a02fa9a9e68d5215828e1d97bb4f6996976 (patch) | |
tree | 95480e645fe16f17fd9ccc43a893699476b60a63 /environment.c | |
parent | Merge branch 'fc/http-version' (diff) | |
parent | odb_load_loose_cache: fix strbuf leak (diff) | |
download | git-3b2f8a02fa9a9e68d5215828e1d97bb4f6996976.tar.xz git-3b2f8a02fa9a9e68d5215828e1d97bb4f6996976.zip |
Merge branch 'jk/loose-object-cache'
Code clean-up with optimization for the codepath that checks
(non-)existence of loose objects.
* jk/loose-object-cache:
odb_load_loose_cache: fix strbuf leak
fetch-pack: drop custom loose object cache
sha1-file: use loose object cache for quick existence check
object-store: provide helpers for loose_objects_cache
sha1-file: use an object_directory for the main object dir
handle alternates paths the same as the main object dir
sha1_file_name(): overwrite buffer instead of appending
rename "alternate_object_database" to "object_directory"
submodule--helper: prefer strip_suffix() to ends_with()
fsck: do not reuse child_process structs
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.c b/environment.c index 3465597707..0e37741d83 100644 --- a/environment.c +++ b/environment.c @@ -274,9 +274,9 @@ const char *get_git_work_tree(void) char *get_object_directory(void) { - if (!the_repository->objects->objectdir) + if (!the_repository->objects->odb) BUG("git environment hasn't been setup"); - return the_repository->objects->objectdir; + return the_repository->objects->odb->path; } int odb_mkstemp(struct strbuf *temp_filename, const char *pattern) |