git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] "diff --check" and whitespace enhancements
@ 2007-12-13 13:32 Wincent Colaiuta
  2007-12-13 13:32 ` [PATCH 1/5] "diff --check" should affect exit status Wincent Colaiuta
  0 siblings, 1 reply; 24+ messages in thread
From: Wincent Colaiuta @ 2007-12-13 13:32 UTC (permalink / raw)
  To: git; +Cc: gitster

This is a repost of the topic I posted yesterday, rebased on top
of master and omitting the changes already applied to it.

Of the series the most interesting is [3/5], where I implement
Junio's suggestion of further refactoring to get rid of
emit_line_with_ws().

[1/5] "diff --check" should affect exit status
[2/5] New version of pre-commit hook
[3/5] Unify whitespace checking
[4/5] Make "diff --check" output match "git apply"
[5/5] Add tests for "git diff --check" with core.whitespace options

I think there are still some opportunities for further refactoring
and clean-up, but this is a good start.

Overall the refactoring saves duplication and reduces the line
count (apart from the tests, of course, where line count goes
unequivocally up).

 Documentation/diff-options.txt |    4 +-
 builtin-apply.c                |   56 +++----------
 builtin-diff-files.c           |    2 +
 builtin-diff-index.c           |    2 +
 builtin-diff-tree.c            |   28 +++---
 builtin-diff.c                 |    3 +-
 cache.h                        |    4 +
 diff.c                         |  172 +++++++++---------------------------
 diff.h                         |    1 +
 t/t4015-diff-whitespace.sh     |  189 +++++++++++++++++++++++++++++++++++++++-
 templates/hooks--pre-commit    |   67 ++-------------
 ws.c                           |  105 ++++++++++++++++++++++
 12 files changed, 379 insertions(+), 254 deletions(-)

Cheers,
Wincent

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2007-12-14 20:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 13:32 [PATCH 0/5] "diff --check" and whitespace enhancements Wincent Colaiuta
2007-12-13 13:32 ` [PATCH 1/5] "diff --check" should affect exit status Wincent Colaiuta
2007-12-13 13:32   ` [PATCH 2/5] New version of pre-commit hook Wincent Colaiuta
2007-12-13 13:32     ` [PATCH 3/5] Unify whitespace checking Wincent Colaiuta
2007-12-13 13:32       ` [PATCH 4/5] Make "diff --check" output match "git apply" Wincent Colaiuta
2007-12-13 13:32         ` [PATCH 5/5] Add tests for "git diff --check" with core.whitespace options Wincent Colaiuta
2007-12-14  0:55           ` Junio C Hamano
2007-12-14  0:12         ` [PATCH 4/5] Make "diff --check" output match "git apply" Junio C Hamano
2007-12-13 13:40       ` [PATCH 3/5] Unify whitespace checking Andreas Ericsson
2007-12-14  0:03       ` Junio C Hamano
2007-12-14  7:36         ` Wincent Colaiuta
2007-12-14  0:17     ` [PATCH 2/5] New version of pre-commit hook Jakub Narebski
2007-12-14  7:24       ` Wincent Colaiuta
2007-12-14 10:23         ` Jakub Narebski
2007-12-13 19:45   ` [PATCH] Don't use the pager when running "git diff --check" Wincent Colaiuta
2007-12-14  4:51     ` Jeff King
2007-12-14  5:11       ` Junio C Hamano
2007-12-14  7:33         ` Junio C Hamano
2007-12-14  7:51           ` Wincent Colaiuta
2007-12-14  7:57             ` Junio C Hamano
2007-12-14  7:47         ` Wincent Colaiuta
2007-12-14 20:54           ` Junio C Hamano
2007-12-13 23:51   ` [PATCH 1/5] "diff --check" should affect exit status Junio C Hamano
2007-12-14  2:10     ` Junio C Hamano

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).