From: Jeremiah Mahler <jmmahler@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git@vger.kernel.org, Jeremiah Mahler <jmmahler@gmail.com>
Subject: [PATCH v2 00/19] add strbuf_set operations
Date: Mon, 9 Jun 2014 15:19:19 -0700 [thread overview]
Message-ID: <cover.1402348696.git.jmmahler@gmail.com> (raw)
Version 2 of the patch set to add strbuf_set operations.
Includes suggestions from Eric Sunshine [1]:
- New operations and their documentation placed in one patch.
- Less ambiguous documentation: "Replace the buffer content with [...]"
- Use imperative mood in log messages.
- Don't use strbuf_set operations in cases where strbuf_add is used to
build up a buffer in multiple steps. Multiple adds suggest that
re-ordering is possible whereas a strbuf_set at the beginning
suggests that it isn't. This is confusing.
Using strbuf_set before a sequence of adds can be confusing. But using
strbuf_add when nothing important was being added to can also be
confusing. strbuf_set can be used to make these cases more clear.
struct strbuf mybuf = STRBUF_INIT;
strbuf_add(&mybuf, ...); /* Was something there before? */
strbuf_set(&mybuf, ...); /* Replace everything. */
Several single line replacements were made for this reason.
Additional files have also been converted compared to version 1 [1].
[1]: http://marc.info/?l=git&m=140230874124060&w=2
Jeremiah Mahler (19):
add strbuf_set operations
sha1_name: simplify via strbuf_set()
fast-import: simplify via strbuf_set()
builtin/remote: simplify via strbuf_set()
branch: simplify via strbuf_set()
builtin/branch: simplify via strbuf_set()
builtin/checkout: simplify via strbuf_set()
builtin/mailinfo: simplify via strbuf_set()
builtin/tag: simplify via strbuf_set()
date: simplify via strbuf_set()
diffcore-order: simplify via strbuf_set()
http-backend: simplify via strbuf_set()
http: simplify via strbuf_set()
ident: simplify via strbuf_set()
remote-curl: simplify via strbuf_set()
submodule: simplify via strbuf_set()
transport: simplify via strbuf_set()
vcs-svn/svndump: simplify via strbuf_set()
wt-status: simplify via strbuf_set()
Documentation/technical/api-strbuf.txt | 18 +++++++++++
branch.c | 6 ++--
builtin/branch.c | 3 +-
builtin/checkout.c | 18 ++++-------
builtin/mailinfo.c | 18 ++++-------
builtin/remote.c | 59 ++++++++++++----------------------
builtin/tag.c | 3 +-
date.c | 3 +-
diffcore-order.c | 3 +-
fast-import.c | 6 ++--
http-backend.c | 6 ++--
http.c | 3 +-
ident.c | 6 ++--
remote-curl.c | 3 +-
sha1_name.c | 15 +++------
strbuf.c | 21 ++++++++++++
strbuf.h | 14 ++++++++
submodule.c | 5 ++-
transport.c | 3 +-
vcs-svn/svndump.c | 3 +-
wt-status.c | 3 +-
21 files changed, 110 insertions(+), 109 deletions(-)
--
2.0.0.592.gf55b190
next reply other threads:[~2014-06-09 22:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 22:19 Jeremiah Mahler [this message]
2014-06-09 22:19 ` [PATCH v2 01/19] add strbuf_set operations Jeremiah Mahler
2014-06-11 8:42 ` Eric Sunshine
2014-06-12 7:10 ` Jeremiah Mahler
2014-06-11 12:05 ` Michael Haggerty
2014-06-12 7:10 ` Jeremiah Mahler
2014-06-12 10:21 ` Michael Haggerty
2014-06-12 23:59 ` Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 02/19] sha1_name: simplify via strbuf_set() Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 03/19] fast-import: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 04/19] builtin/remote: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 05/19] branch: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 06/19] builtin/branch: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 07/19] builtin/checkout: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 08/19] builtin/mailinfo: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 09/19] builtin/tag: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 10/19] date: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 11/19] diffcore-order: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 12/19] http-backend: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 13/19] http: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 14/19] ident: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 15/19] remote-curl: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 16/19] submodule: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 17/19] transport: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 18/19] vcs-svn/svndump: " Jeremiah Mahler
2014-06-09 22:19 ` [PATCH v2 19/19] wt-status: " Jeremiah Mahler
2014-06-11 8:09 ` [PATCH v2 00/19] add strbuf_set operations Eric Sunshine
2014-06-12 7:09 ` Jeremiah Mahler
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=cover.1402348696.git.jmmahler@gmail.com \
--to=jmmahler@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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).