summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-06-22 00:40:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-22 01:54:43 (GMT)
commitc84a1f3ed4d5314d2acc2bdca71b0bc5088423f9 (patch)
tree2f9ee95868dc8fa2d7bf3594706f9087485a9a62 /cache.h
parent845b102b9951949a2413b3e6d425d9fb4424ff9e (diff)
downloadgit-c84a1f3ed4d5314d2acc2bdca71b0bc5088423f9.zip
git-c84a1f3ed4d5314d2acc2bdca71b0bc5088423f9.tar.gz
git-c84a1f3ed4d5314d2acc2bdca71b0bc5088423f9.tar.bz2
sha1_file: refactor read_object
read_object() and sha1_object_info_extended() both implement mechanisms such as object replacement, retrying the packed store after failing to find the object in the packed store then the loose store, and being able to mark a packed object as bad and then retrying the whole process. Consolidating these mechanisms would be a great help to maintainability. Therefore, consolidate them by extending sha1_object_info_extended() to support the functionality needed, and then modifying read_object() to use sha1_object_info_extended(). Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index a3631b2..48aea92 100644
--- a/cache.h
+++ b/cache.h
@@ -1827,6 +1827,7 @@ struct object_info {
off_t *disk_sizep;
unsigned char *delta_base_sha1;
struct strbuf *typename;
+ void **contentp;
/* Response */
enum {