Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-12 23:41:35 +0300
committerJunio C Hamano <gitster@pobox.com>2020-02-12 23:41:35 +0300
commitb486d2ee811d7471e7a31cd315eddca1be79fc19 (patch)
treee89a588a70e654c01320cc0f7ae5e0f849a3d542 /object-store.h
parentde93cc14ab7e8db7645d8dbe4fd2603f76d5851f (diff)
parent60440d72db4c9f2fc05b841813e72159c4f08928 (diff)
Merge branch 'jn/pretend-object-doc'
Warn programmers about pretend_object_file() that allows the code to tentatively use in-core objects. * jn/pretend-object-doc: sha1-file: document how to use pretend_object_file
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h
index 61b8b13e3b..8c53c0d9bf 100644
--- a/object-store.h
+++ b/object-store.h
@@ -208,6 +208,14 @@ int hash_object_file_literally(const void *buf, unsigned long len,
const char *type, struct object_id *oid,
unsigned flags);
+/*
+ * Add an object file to the in-memory object store, without writing it
+ * to disk.
+ *
+ * Callers are responsible for calling write_object_file to record the
+ * object in persistent storage before writing any other new objects
+ * that reference it.
+ */
int pretend_object_file(void *, unsigned long, enum object_type,
struct object_id *oid);