summaryrefslogtreecommitdiff
path: root/object-store.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-03-23 17:21:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-26 17:05:55 (GMT)
commit77f012e876d5845856cb939c6435e839d5f9d027 (patch)
treed407995eb85c23517b2fd1f33929dd3c2dde200a /object-store.h
parent0b2090340544caaabb378706a6ed3853dd617a6f (diff)
downloadgit-77f012e876d5845856cb939c6435e839d5f9d027.zip
git-77f012e876d5845856cb939c6435e839d5f9d027.tar.gz
git-77f012e876d5845856cb939c6435e839d5f9d027.tar.bz2
sha1_file: allow link_alt_odb_entries to handle arbitrary repositories
Actually this also allows read_info_alternates and link_alt_odb_entry to handle arbitrary repositories, but link_alt_odb_entries is the most interesting function in this set of functions, hence the commit subject. These functions span a strongly connected component in the function graph, i.e. the recursive call chain might look like -> link_alt_odb_entries -> link_alt_odb_entry -> read_info_alternates -> link_alt_odb_entries That is why we need to convert all these functions at the same time. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h
index 79de470..3fc461a 100644
--- a/object-store.h
+++ b/object-store.h
@@ -18,6 +18,10 @@ struct alternate_object_database {
char loose_objects_subdir_seen[256];
struct oid_array loose_objects_cache;
+ /*
+ * Path to the alternative object store. If this is a relative path,
+ * it is relative to the current working directory.
+ */
char path[FLEX_ARRAY];
};
#define prepare_alt_odb(r) prepare_alt_odb_##r()