]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diffcore.h
Merge branch 'jc/sparse-error-for-developer-build'
[thirdparty/git.git] / diffcore.h
index 3b2020ce93ac93d2c377c15ca7167caf90880b43..d2a63c5c71f4e3667643b1fba5c195e049e313c9 100644 (file)
@@ -65,9 +65,22 @@ void free_filespec(struct diff_filespec *);
 void fill_filespec(struct diff_filespec *, const struct object_id *,
                   int, unsigned short);
 
+/*
+ * Prefetch the entries in diff_queued_diff. The parameter is a pointer to a
+ * struct repository.
+ */
+void diff_queued_diff_prefetch(void *repository);
+
 struct diff_populate_filespec_options {
        unsigned check_size_only : 1;
        unsigned check_binary : 1;
+
+       /*
+        * If an object is missing, diff_populate_filespec() will invoke this
+        * callback before attempting to read that object again.
+        */
+       void (*missing_object_cb)(void *);
+       void *missing_object_data;
 };
 int diff_populate_filespec(struct repository *, struct diff_filespec *,
                           const struct diff_populate_filespec_options *);
@@ -185,4 +198,12 @@ int diffcore_count_changes(struct repository *r,
                           unsigned long *src_copied,
                           unsigned long *literal_added);
 
+/*
+ * If filespec contains an OID and if that object is missing from the given
+ * repository, add that OID to to_fetch.
+ */
+void diff_add_if_missing(struct repository *r,
+                        struct oid_array *to_fetch,
+                        const struct diff_filespec *filespec);
+
 #endif