From: Tobias Klauser <tklauser@distanz.ch>
To: Junio C Hamano <gitster@pobox.com>,
Matthieu Moy <Matthieu.Moy@imag.fr>,
git@vger.kernel.org
Subject: [PATCH v2 0/4] stripspace: Implement and use --count-lines option
Date: Fri, 16 Oct 2015 17:16:41 +0200 [thread overview]
Message-ID: <1445008605-16534-1-git-send-email-tklauser@distanz.ch> (raw)
(1) Move the stripspace() function to the strbuf module adding a prefix
and changing all users accordingly. Also introduce a wrapper in case
any topic branches still depend on the old name.
(2) Switch git stripspace to use parse-options in order to simplify
introducing new command line options (as in the following patch). In
v1 this was folded into patch (3) and is now split out for v2.
(3) Introduce option --count-lines to git stripspace and add the
corresponding documentation and tests.
(4) Change git-rebase--interactive.sh to replace commands like:
git stripspace ... | wc -l
with:
git stripspace --count-lines ...
This patch set implements some of the project ideas around git stripspace
suggested on https://git.wiki.kernel.org/index.php/SmallProjectsIdeas
v1 -> v2:
- Thanks to Junio and Matthieu for the review.
- Split patch 2/3 into two patches: patch 2/4 switches git stripspace
to use parse-options and patch 3/4 introduces the new option.
- Implement line counting in cmd_stripbuf() instead of (ab-)using
strbuf_stripspace() for it.
- Drop -C short option
- Correct example command output in documentation.
- Adjust commit messages to not include links to the wiki, fully
describe the motivation in the commit message instead.
Tobias Klauser (4):
strbuf: make stripspace() part of strbuf
stripspace: Use parse-options for command-line parsing
stripspace: Implement --count-lines option
git rebase -i: Use newly added --count-lines option for stripspace
Documentation/git-stripspace.txt | 14 +++-
builtin/am.c | 2 +-
builtin/branch.c | 2 +-
builtin/commit.c | 6 +-
builtin/merge.c | 2 +-
builtin/notes.c | 6 +-
builtin/stripspace.c | 137 +++++++++++++--------------------------
builtin/tag.c | 2 +-
git-rebase--interactive.sh | 6 +-
strbuf.c | 66 +++++++++++++++++++
strbuf.h | 11 +++-
t/t0030-stripspace.sh | 36 ++++++++++
12 files changed, 181 insertions(+), 109 deletions(-)
--
2.6.1.148.g7927db1
next reply other threads:[~2015-10-16 15:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 15:16 Tobias Klauser [this message]
2015-10-16 15:16 ` [PATCH v2 1/4] strbuf: make stripspace() part of strbuf Tobias Klauser
2015-10-16 15:16 ` [PATCH v2 2/4] stripspace: Use parse-options for command-line parsing Tobias Klauser
2015-10-16 17:07 ` Junio C Hamano
2015-10-16 17:29 ` Junio C Hamano
2015-10-17 10:31 ` Tobias Klauser
2015-10-17 21:24 ` Junio C Hamano
2015-10-20 8:48 ` Tobias Klauser
2015-10-20 15:47 ` Junio C Hamano
2015-10-17 10:30 ` Tobias Klauser
2015-10-16 15:16 ` [PATCH v2 3/4] stripspace: Implement --count-lines option Tobias Klauser
2015-10-17 23:57 ` Eric Sunshine
2015-10-18 17:18 ` Junio C Hamano
2015-10-19 13:46 ` Tobias Klauser
2015-10-19 17:03 ` Christian Couder
2015-10-19 19:24 ` Eric Sunshine
2015-10-19 19:42 ` Matthieu Moy
2015-10-19 13:31 ` Tobias Klauser
2015-10-16 15:16 ` [PATCH v2 4/4] git rebase -i: Use newly added --count-lines option for stripspace Tobias Klauser
2015-10-16 16:41 ` [PATCH v2 0/4] stripspace: Implement and use --count-lines option Junio C Hamano
2015-10-17 10:27 ` Tobias Klauser
2015-10-16 16:54 ` Matthieu Moy
2015-10-17 10:28 ` Tobias Klauser
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=1445008605-16534-1-git-send-email-tklauser@distanz.ch \
--to=tklauser@distanz.ch \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).