I was reading around in the neighborhood of fsck, objects, and packs and I had the familiar and discouraging experience of having to read code all the way up and down the callstack to understand *anything*. Please let's all make more of an effort to document functions, especially things that are not obvious from the name and signature, like who owns the memory that is being referred to. This is my attempt to document a number of the functions that I was looking at based on what I inferred from my reading. It is also a selfish trick to get other people to double-check my understanding. I also fixed up a couple of small things that I noticed along the way: "refactoring for understanding". Michael Haggerty (6): Add docstrings for lookup_replace_object() and do_lookup_replace_object() replace_object: use struct members instead of an array find_pack_entry(): document last_found_pack sha1_file_name(): declare to return a const string Document a bunch of functions defined in sha1_file.c Document some functions defined in object.c cache.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- http.c | 2 +- object.c | 23 +++++++++++++++- object.h | 7 +++++ replace_object.c | 17 ++++++++---- sha1_file.c | 66 ++++++++++++++++++++++++-------------------- 6 files changed, 157 insertions(+), 42 deletions(-) -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html