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:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-05 02:48:31 +0300
committerJunio C Hamano <gitster@pobox.com>2022-02-26 04:16:32 +0300
commit0ff7b4f976b78ab38313356b3e0582e5fa9a3bcc (patch)
treee1540b722fef4fed68ded9fc975c4e5b84b4f2fb /object-store.h
parent0f156dbb04b434d95ce5465e6b07d8869d55e8e0 (diff)
object API: rename hash_object_file_literally() to write_*()
Before 0c3db67cc81 (hash-object --literally: fix buffer overrun with extra-long object type, 2015-05-04) the hash-object code being changed here called write_sha1_file() to both hash and write a loose object. Before that we'd use hash_sha1_file() to if "-w" wasn't provided, and otherwise call write_sha1_file(). Now we'll always call the same function for both writing. Let's rename it from hash_*_literally() to write_*_literally(). Even though the write_*() might not actually write if HASH_WRITE_OBJECT isn't in "flags", having it be more similar to write_object_file_flags() than hash_object_file(), but carrying a name that would suggest that it's a variant of the latter is confusing. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/object-store.h b/object-store.h
index eab1e2a967..29169d117f 100644
--- a/object-store.h
+++ b/object-store.h
@@ -258,9 +258,9 @@ static inline int write_object_file(const void *buf, unsigned long len,
return write_object_file_flags(buf, len, type, oid, 0);
}
-int hash_object_file_literally(const void *buf, unsigned long len,
- const char *type, struct object_id *oid,
- unsigned flags);
+int write_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