I've been preparing some patches against a project (qemu) which has an indent style of only spaces, i.e. tabs forbidden. I usually use diff --check to make sure I catch stray spaces when I'm working on tab-indented code, and although core.whitespace can be set to indent-with-non-tab to enforce the use of tabs, there's no corresponding 'indent-with-tab' rule to forbid them. The asymmetry bothered me, so I've added support for this to ws.c in the following small patch. Would this rule be more clearly described as indent-with-non-space instead? For completeness, I'd also like to support core.whitespace = indent-with-tab in git apply --whitespace=fix (although I don't use this myself). It's trivial to expand the tabs in ws_fix_copy(), but this would violate the assumption in the calling code that whitespace cleanup doesn't result in a dst string longer than src. I think the only sane way I can deal with this correctly is to properly replumb ws_fix_copy() and its callers to use a strbuf instead of a char *dst? cache.h | 1 + ws.c | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html