From: Jeff King <peff@peff.net>
To: Brian Gesiak <modocache@gmail.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] strbuf: Use _rtrim and _ltrim in strbuf_trim
Date: Wed, 30 Apr 2014 13:11:06 -0400 [thread overview]
Message-ID: <20140430171105.GA8518@sigill.intra.peff.net> (raw)
In-Reply-To: <1398848287-77109-1-git-send-email-modocache@gmail.com>
On Wed, Apr 30, 2014 at 05:58:06PM +0900, Brian Gesiak wrote:
> strbuf_trim strips whitespace from the end, then the beginning of a
> strbuf. Those operations are duplicated in strbuf_rtrim and
> strbuf_ltrim.
>
> Replace strbuf_trim implementation with calls to strbuf_rtrim,
> then strbuf_ltrim.
Thanks, this looks good. I wondered if perhaps doing them together
inline might have been more efficient, but there really is no overlap in
what they compute.
The documentation patch looks good to me, too.
-Peff
prev parent reply other threads:[~2014-04-30 17:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 8:58 [PATCH 1/2] strbuf: Use _rtrim and _ltrim in strbuf_trim Brian Gesiak
2014-04-30 8:58 ` [PATCH 2/2] api-strbuf.txt: Add docs for _trim and _ltrim Brian Gesiak
2014-04-30 17:11 ` Jeff King [this message]
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=20140430171105.GA8518@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=modocache@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).