git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Add a bunch of docstrings and make a few minor cleanups
@ 2014-02-21 16:32 Michael Haggerty
  2014-02-21 16:32 ` [PATCH 1/6] Add docstrings for lookup_replace_object() and do_lookup_replace_object() Michael Haggerty
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Michael Haggerty @ 2014-02-21 16:32 UTC (permalink / raw)
  To: Junio C Hamano, Jeff King, Nicolas Pitre; +Cc: git, Michael Haggerty

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-02-25 15:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 16:32 [PATCH 0/6] Add a bunch of docstrings and make a few minor cleanups Michael Haggerty
2014-02-21 16:32 ` [PATCH 1/6] Add docstrings for lookup_replace_object() and do_lookup_replace_object() Michael Haggerty
2014-02-21 18:21   ` Junio C Hamano
2014-02-24  8:25     ` Michael Haggerty
2014-02-24  9:24   ` Christian Couder
2014-02-24 10:17     ` Michael Haggerty
2014-02-24 18:06       ` Junio C Hamano
2014-02-21 16:32 ` [PATCH 2/6] replace_object: use struct members instead of an array Michael Haggerty
2014-02-21 18:23   ` Junio C Hamano
2014-02-21 16:32 ` [PATCH 3/6] find_pack_entry(): document last_found_pack Michael Haggerty
2014-02-21 17:15   ` Nicolas Pitre
2014-02-21 16:32 ` [PATCH 4/6] sha1_file_name(): declare to return a const string Michael Haggerty
2014-02-21 16:32 ` [PATCH 5/6] Document a bunch of functions defined in sha1_file.c Michael Haggerty
2014-02-21 17:17   ` Nicolas Pitre
2014-02-24 18:18   ` Jakub Narębski
2014-02-24 20:01     ` Michael Haggerty
2014-02-24 20:08       ` Jonathan Nieder
2014-02-25 15:23         ` Michael Haggerty
2014-02-21 16:32 ` [PATCH 6/6] Document some functions defined in object.c Michael Haggerty
2014-02-21 17:33   ` Nicolas Pitre
2014-02-24  8:47     ` Michael Haggerty
2014-02-24 17:12       ` Junio C Hamano
2014-02-24 17:58 ` [PATCH 0/6] Add a bunch of docstrings and make a few minor cleanups Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).