git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/4] stripspace: Implement and use --count-lines option

From
Tobias Klauser <tklauser@distanz.ch>
Date
Oct 16, 2015, 15:16 UTC
Message-ID
<1445008605-16534-1-git-send-email-tklauser@distanz.ch>
(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: Tobias Klauser
Message 1 of 23 in “stripspace: Implement and use --count-lines option”
  1. 0/4 stripspace: Implement and use --count-lines optionTobias Klauser, Oct 16, 2015
  2. 1/4 strbuf: make stripspace() part of strbufTobias Klauser, Oct 16, 2015
  3. 2/4 stripspace: Use parse-options for command-line parsingTobias Klauser, Oct 16, 2015
  4. Junio C HamanoOct 16, 2015
  5. Junio C HamanoOct 16, 2015
  6. Tobias KlauserOct 17, 2015
  7. Junio C HamanoOct 17, 2015
  8. Tobias KlauserOct 20, 2015
  9. Junio C HamanoOct 20, 2015
  10. Tobias KlauserOct 17, 2015
  11. 3/4 stripspace: Implement --count-lines optionTobias Klauser, Oct 16, 2015
  12. Eric SunshineOct 17, 2015
  13. Junio C HamanoOct 18, 2015
  14. Tobias KlauserOct 19, 2015
  15. Christian CouderOct 19, 2015
  16. Eric SunshineOct 19, 2015
  17. Matthieu MoyOct 19, 2015
  18. Tobias KlauserOct 19, 2015
  19. 4/4 git rebase -i: Use newly added --count-lines option for stripspaceTobias Klauser, Oct 16, 2015
  20. Junio C HamanoOct 16, 2015
  21. Tobias KlauserOct 17, 2015
  22. Matthieu MoyOct 16, 2015
  23. Tobias KlauserOct 17, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.