{"thread":{"id":"49738","subject":"[PATCH] it's called read_object_file() these days","startedAt":"2018-11-02T06:05:11Z","lastAt":"2018-11-02T11:49:02Z","messageCount":3,"participants":["Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"362241","messageId":"xmqqpnvoovzk.fsf@gitster-ct.c.googlers.com","threadId":"49738","inReplyTo":null,"subject":"[PATCH] it's called read_object_file() these days","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-02T06:05:03Z","receivedAt":"2018-11-02T06:05:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Remnant of the old name of the function still remains in comments.\nUpdate them all.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n apply.c       | 2 +-\n builtin/gc.c  | 2 +-\n fast-import.c | 4 ++--\n notes.c       | 2 +-\n object.h      | 2 +-\n sha1-file.c   | 2 +-\n 6 files changed, 7 insertions(+), 7 deletions(-)\n\ndiff --git a/apply.c b/apply.c\nindex 073d5f0451..ef1a1b2c4e 100644\n--- a/apply.c\n+++ b/apply.c\n@@ -3254,7 +3254,7 @@ static int read_blob_object(struct strbuf *buf, const struct object_id *oid, uns\n \t\tresult = read_object_file(oid, &type, &sz);\n \t\tif (!result)\n \t\t\treturn -1;\n-\t\t/* XXX read_sha1_file NUL-terminates */\n+\t\t/* XXX read_object_file NUL-terminates */\n \t\tstrbuf_attach(buf, result, sz, sz + 1);\n \t}\n \treturn 0;\ndiff --git a/builtin/gc.c b/builtin/gc.c\nindex 871a56f1c5..a682a0f44e 100644\n--- a/builtin/gc.c\n+++ b/builtin/gc.c\n@@ -285,7 +285,7 @@ static uint64_t estimate_repack_memory(struct packed_git *pack)\n \t/* revindex is used also */\n \theap += sizeof(struct revindex_entry) * nr_objects;\n \t/*\n-\t * read_sha1_file() (either at delta calculation phase, or\n+\t * read_object_file() (either at delta calculation phase, or\n \t * writing phase) also fills up the delta base cache\n \t */\n \theap += delta_base_cache_limit;\ndiff --git a/fast-import.c b/fast-import.c\nindex 95600c78e0..f73b2ae0a6 100644\n--- a/fast-import.c\n+++ b/fast-import.c\n@@ -1298,13 +1298,13 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)\n  * oe must not be NULL.  Such an oe usually comes from giving\n  * an unknown SHA-1 to find_object() or an undefined mark to\n  * find_mark().  Callers must test for this condition and use\n- * the standard read_sha1_file() when it happens.\n+ * the standard read_object_file() when it happens.\n  *\n  * oe->pack_id must not be MAX_PACK_ID.  Such an oe is usually from\n  * find_mark(), where the mark was reloaded from an existing marks\n  * file and is referencing an object that this fast-import process\n  * instance did not write out to a packfile.  Callers must test for\n- * this condition and use read_sha1_file() instead.\n+ * this condition and use read_object_file() instead.\n  */\n static void *gfi_unpack_entry(\n \tstruct object_entry *oe,\ndiff --git a/notes.c b/notes.c\nindex 25cdce28b7..6a430931a3 100644\n--- a/notes.c\n+++ b/notes.c\n@@ -858,7 +858,7 @@ static int string_list_add_note_lines(struct string_list *list,\n \tif (is_null_oid(oid))\n \t\treturn 0;\n \n-\t/* read_sha1_file NUL-terminates */\n+\t/* read_object_file NUL-terminates */\n \tdata = read_object_file(oid, &t, &len);\n \tif (t != OBJ_BLOB || !data || !len) {\n \t\tfree(data);\ndiff --git a/object.h b/object.h\nindex 0feb90ae61..4cabc9f278 100644\n--- a/object.h\n+++ b/object.h\n@@ -136,7 +136,7 @@ struct object *parse_object(struct repository *r, const struct object_id *oid);\n  */\n struct object *parse_object_or_die(const struct object_id *oid, const char *name);\n \n-/* Given the result of read_sha1_file(), returns the object after\n+/* Given the result of read_object_file(), returns the object after\n  * parsing it.  eaten_p indicates if the object has a borrowed copy\n  * of buffer and the caller should not free() it.\n  */\ndiff --git a/sha1-file.c b/sha1-file.c\nindex dd0b6aa873..31c2b926fe 100644\n--- a/sha1-file.c\n+++ b/sha1-file.c\n@@ -124,7 +124,7 @@ const char *empty_blob_oid_hex(void)\n \n /*\n  * This is meant to hold a *small* number of objects that you would\n- * want read_sha1_file() to be able to return, but yet you do not want\n+ * want read_object_file() to be able to return, but yet you do not want\n  * to write them into the object store (e.g. a browse-only\n  * application).\n  */\n"},{"id":"362243","messageId":"20181102062429.GA29939@sigill.intra.peff.net","threadId":"49738","inReplyTo":"xmqqpnvoovzk.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] it's called read_object_file() these days","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-02T06:24:29Z","receivedAt":"2018-11-02T06:24:33Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 02, 2018 at 03:05:03PM +0900, Junio C Hamano wrote:\n\n> Remnant of the old name of the function still remains in comments.\n> Update them all.\n\nYay. What's here looks obviously correct.\n\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  apply.c       | 2 +-\n>  builtin/gc.c  | 2 +-\n>  fast-import.c | 4 ++--\n>  notes.c       | 2 +-\n>  object.h      | 2 +-\n>  sha1-file.c   | 2 +-\n>  6 files changed, 7 insertions(+), 7 deletions(-)\n\nThere's another mention in Documentation/technical/api-object-access.txt.\n\nBut since the entire API is undocumented, I'm not sure it matters much.\nThat file has been a placeholder since 2007. Maybe we should just delete\nit; its existence does not seem to be guilting anyone into documenting,\nand these days we'd prefer to do it in-header anyway.\n\n-Peff\n"},{"id":"362263","messageId":"xmqqd0rnpumu.fsf@gitster-ct.c.googlers.com","threadId":"49738","inReplyTo":"20181102062429.GA29939@sigill.intra.peff.net","subject":"Re: [PATCH] it's called read_object_file() these days","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-02T11:48:57Z","receivedAt":"2018-11-02T11:49:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> There's another mention in Documentation/technical/api-object-access.txt.\n\nYes, and we are on the same page on that one.\n\n>\n> But since the entire API is undocumented, I'm not sure it matters much.\n> That file has been a placeholder since 2007. Maybe we should just delete\n> it; its existence does not seem to be guilting anyone into documenting,\n> and these days we'd prefer to do it in-header anyway.\n>\n> -Peff\n"}]}