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

[PATCH 0/6] Add tab-in-indent whitespace rule

From
Chris Webb <chris@arachsys.com>
Date
Apr 2, 2010, 23:36 UTC
Message-ID
<cover.1270250437.git.chris@arachsys.com>

This patch set introduces a new whitespace error/fix class for projects and languages with a coding style where no tab character is used to indent the lines.

To implement this feature, we need to rework ws_fix_copy() to append to a strbuf rather than write into a fixed-size output buffer, because tabs may be expanded into multiple spaces when tab-in-indent is applied. We also have to change the "catch all errors known to git" to exclude tab-in-indent, which directly conflicts with the existing indent-with-non-tab rule.

Junio C Hamano (1):
  whitespace: we cannot "catch all errors known to git" anymore
Chris Webb (5):
  whitespace: add tab-in-indent error class
  whitespace: tests for git-diff --check with tab-in-indent error class
  whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst
  whitespace: add tab-in-indent support for --whitespace=fix
  whitespace: tests for git-apply --whitespace=fix with tab-in-indent
 Documentation/config.txt   |    2 +
 builtin/apply.c            |   81 +++++++++++++++++++++-----------------------
 cache.h                    |    3 +-
 t/t4015-diff-whitespace.sh |   42 +++++++++++++++++++++++
 t/t4124-apply-ws-rule.sh   |   53 ++++++++++++++++-------------
 ws.c                       |   73 ++++++++++++++++++++++++++++-----------
 6 files changed, 166 insertions(+), 88 deletions(-)
Next: Chris Webb
Message 1 of 8 in “Add tab-in-indent whitespace rule”
  1. 0/6 Add tab-in-indent whitespace ruleChris Webb, Apr 2, 2010
  2. 1/6 whitespace: we cannot "catch all errors known to git" anymoreChris Webb, Apr 2, 2010
  3. 2/6 whitespace: add tab-in-indent error classChris Webb, Apr 2, 2010
  4. Martin MaresApr 3, 2010
  5. 3/6 whitespace: tests for git-diff --check with tab-in-indent error classChris Webb, Apr 2, 2010
  6. 4/6 whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dstChris Webb, Apr 2, 2010
  7. 5/6 whitespace: add tab-in-indent support for --whitespace=fixChris Webb, Apr 2, 2010
  8. 6/6 whitespace: tests for git-apply --whitespace=fix with tab-in-indentChris Webb, Apr 2, 2010

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.