]> git.ipfire.org Git - thirdparty/git.git/blobdiff - cache.h
Merge branch 'jt/transfer-fsck-with-promissor'
[thirdparty/git.git] / cache.h
diff --git a/cache.h b/cache.h
index 21fbcc2414953d00929185aeb97f3a6ae9a3f73a..a61b2d3f0d79b0f56992e0343803811f5265d716 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -599,6 +599,7 @@ extern int read_index_unmerged(struct index_state *);
 
 /* For use with `write_locked_index()`. */
 #define COMMIT_LOCK            (1 << 0)
+#define SKIP_IF_UNCHANGED      (1 << 1)
 
 /*
  * Write the index while holding an already-taken lock. Close the lock,
@@ -615,6 +616,9 @@ extern int read_index_unmerged(struct index_state *);
  * With `COMMIT_LOCK`, the lock is always committed or rolled back.
  * Without it, the lock is closed, but neither committed nor rolled
  * back.
+ *
+ * If `SKIP_IF_UNCHANGED` is given and the index is unchanged, nothing
+ * is written (and the lock is rolled back if `COMMIT_LOCK` is given).
  */
 extern int write_locked_index(struct index_state *, struct lock_file *lock, unsigned flags);
 
@@ -1661,7 +1665,7 @@ struct pack_entry {
  * usual "XXXXXX" trailer, and the resulting filename is written into the
  * "template" buffer. Returns the open descriptor.
  */
-extern int odb_mkstemp(struct strbuf *template, const char *pattern);
+extern int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
 
 /*
  * Create a pack .keep file named "name" (which should generally be the output
@@ -1732,7 +1736,7 @@ struct object_info {
        unsigned long *sizep;
        off_t *disk_sizep;
        unsigned char *delta_base_sha1;
-       struct strbuf *typename;
+       struct strbuf *type_name;
        void **contentp;
 
        /* Response */