Re: [PATCH 0/6] Add a bunch of docstrings and make a few minor cleanups
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 22 quoted lines
> 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.
Show 8 quoted lines
>
> 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(-)