Merge branch 'js/lift-parent-count-limit'
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 9aa46e70c3faf7eb678eeef7b825ae52fb4bc0bf..83a27269b89871b166286550ae9cb22c85dc7d10 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -398,7 +398,6 @@ extern int is_bare_repository(void);
 extern int is_inside_git_dir(void);
 extern char *git_work_tree_cfg;
 extern int is_inside_work_tree(void);
-extern int have_git_dir(void);
 extern const char *get_git_dir(void);
 extern int is_git_directory(const char *path);
 extern char *get_object_directory(void);
@@ -761,11 +760,11 @@ int daemon_avoid_alias(const char *path);
 int offset_1st_component(const char *path);
 
 /* object replacement */
-#define READ_SHA1_FILE_REPLACE 1
+#define LOOKUP_REPLACE_OBJECT 1
 extern void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type, unsigned long *size, unsigned flag);
 static inline void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size)
 {
-       return read_sha1_file_extended(sha1, type, size, READ_SHA1_FILE_REPLACE);
+       return read_sha1_file_extended(sha1, type, size, LOOKUP_REPLACE_OBJECT);
 }
 extern const unsigned char *do_lookup_replace_object(const unsigned char *sha1);
 static inline const unsigned char *lookup_replace_object(const unsigned char *sha1)
@@ -774,6 +773,12 @@ static inline const unsigned char *lookup_replace_object(const unsigned char *sh
                return sha1;
        return do_lookup_replace_object(sha1);
 }
+static inline const unsigned char *lookup_replace_object_extended(const unsigned char *sha1, unsigned flag)
+{
+       if (!(flag & LOOKUP_REPLACE_OBJECT))
+               return sha1;
+       return lookup_replace_object(sha1);
+}
 
 /* Read and unpack a sha1 file into memory, write memory to a sha1 file */
 extern int sha1_object_info(const unsigned char *, unsigned long *);
@@ -1075,6 +1080,7 @@ struct object_info {
        enum object_type *typep;
        unsigned long *sizep;
        unsigned long *disk_sizep;
+       unsigned char *delta_base_sha1;
 
        /* Response */
        enum {
@@ -1099,7 +1105,7 @@ struct object_info {
                } packed;
        } u;
 };
-extern int sha1_object_info_extended(const unsigned char *, struct object_info *);
+extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags);
 
 /* Dumb servers support */
 extern int update_server_info(int);