From: Junio C Hamano Date: Mon, 24 Feb 2014 17:58:21 GMT Subject: Re: [PATCH 0/6] Add a bunch of docstrings and make a few minor cleanups Message-ID: In-Reply-To: <1393000327-11402-1-git-send-email-mhagger@alum.mit.edu> Michael Haggerty writes: > 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 Queued 2, 3, 4, and 5, expecting 1 and 6 will be rerolled. Thanks. > > 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(-)