From: Jonathan Nieder <jrnieder@gmail.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: git@vger.kernel.org
Subject: [demo/patch 0/3] Re: [PATCH] Documentation: document the string-list macros.
Date: Sun, 5 Sep 2010 15:03:23 -0500 [thread overview]
Message-ID: <20100905200323.GA14497@burratino> (raw)
In-Reply-To: <1283709077-5438-1-git-send-email-tfransosi@gmail.com>
Thiago Farina wrote:
> --- a/Documentation/technical/api-string-list.txt
> +++ b/Documentation/technical/api-string-list.txt
> @@ -52,6 +52,18 @@ However, if you use the list to check if a certain string was added
> already, you should not do that (using unsorted_string_list_has_string()),
> because the complexity would be quadratic again (but with a worse factor).
>
> +Macros
> +------
> +
> +`STRING_LIST_INIT_NODUP`::
> +
> + Initialize the members and set the `strdup_strings` member to 0.
> +
> +`STRING_LIST_INIT_DUP`::
> +
> + Initialize the members and set the `strdup_strings` member to 1.
After reading that, one might be tempted to write
struct string_list x;
STRING_LIST_INIT_NODUP(x);
, no? In other words, I don't find the text very clear.
If you like working by example (like I do) then api-strbuf.txt might
give a good indication of how this sort of thing can be helpfully
documented.
Maybe something in this direction?
Patch #3 in particular is very rough and ought to be split up for
easier review. This is not meant for application, just to give an
idea.
Jonathan Nieder (3):
string-list: introduce string_list_init()
string-list: document ...
Make initialization of string_lists more consistent
Documentation/technical/api-string-list.txt | 18 +++++++++------
builtin/apply.c | 8 +++---
builtin/blame.c | 4 +-
builtin/clean.c | 2 +-
builtin/commit.c | 4 +-
builtin/fetch.c | 13 ++++-------
builtin/fmt-merge-msg.c | 13 ++++++-----
builtin/log.c | 9 ++-----
builtin/mailsplit.c | 1 +
builtin/notes.c | 4 +-
builtin/remote.c | 30 +++++++++++++-------------
builtin/shortlog.c | 25 ++++++++++++---------
diff-no-index.c | 1 +
mailmap.c | 17 +++++++++-----
mailmap.h | 2 +-
merge-recursive.c | 16 ++++++++------
notes.c | 4 +-
pretty.c | 5 ++-
reflog-walk.c | 1 +
resolve-undo.c | 8 +++---
revision.c | 7 ++++-
string-list.c | 28 +++++++++++++++++++++---
string-list.h | 4 +++
submodule.c | 4 +-
wt-status.c | 6 ++--
25 files changed, 137 insertions(+), 97 deletions(-)
--
1.7.2.3
next prev parent reply other threads:[~2010-09-05 20:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-05 17:51 [PATCH] Documentation: document the string-list macros Thiago Farina
2010-09-05 20:03 ` Jonathan Nieder [this message]
2010-09-05 20:04 ` [demo/PATCH 1/3] string-list: introduce string_list_init() Jonathan Nieder
2010-09-05 20:06 ` [demo/PATCH 1/3] string-list: Document STRING_LIST_INIT_* and string_list_init() Jonathan Nieder
2010-09-05 20:08 ` [demo/PATCH 3/3] Make initialization of string_lists more consistent Jonathan Nieder
2010-09-05 23:19 ` [demo/patch 0/3] Re: [PATCH] Documentation: document the string-list macros Thiago Farina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100905200323.GA14497@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=tfransosi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).