From: Jay Soffian Date: Thu, 22 Sep 2011 15:41:34 GMT Subject: Re: How to use git attributes to configure server-side checks? Message-ID: In-Reply-To: <4E7AF1AE.5030005@alum.mit.edu> On Thu, Sep 22, 2011 at 4:28 AM, Michael Haggerty wrote: > Where does "git show --check" read its gitattributes (i.e., > "whitespace") from? It looks like builtin_checkdiff (diff.c) calls whitespace_rule (ws.c) which in turn calls git_check_attr (attr.c) which, in a bare repo, considers $(prefix)/etc/gitattributes, core.attributesfile and $GIT_DIR/info/attributes, falling back to the default whitespace rule of trailing_space, space_before_tab, and tab-width of 8 (WS_DEFAULT_RULE in cache.h). Thank you for this thread. I was under the illusion that diff-tree --check considered in-tree .gitattributes, but the code seems to indicate otherwise. :-( j.