Re: How to use git attributes to configure server-side checks?
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Sep 22, 2011, 15:41 UTC
- Message-ID
- <CAG+J_DxtCx6-RKWLKFy+V7tOtu7UnUrke7iN8gNdGiY-sC52sQ@mail.gmail.com>
- In-Reply-To
- <4E7AF1AE.5030005@alum.mit.edu>
On Thu, Sep 22, 2011 at 4:28 AM, Michael Haggerty <mhagger@alum.mit.edu> 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.