From: Junio C Hamano Date: Thu, 22 Sep 2011 23:36:45 GMT Subject: Re: [PATCH 1/2] Teach '--cached' option to check-attr Message-ID: <7vzkhww3n6.fsf@alter.siamese.dyndns.org> In-Reply-To: <1316727861-90460-1-git-send-email-jaysoffian@gmail.com> Jay Soffian writes: > This doesn't seem too controversial to me, and allows server-side > reading of .gitattributes, albeit with the need to setup an index. Thanks; will queue with a few trivial tweaks. > +test_expect_success 'bare repository: check that --cached honors index' ' > + > + export GIT_INDEX_FILE=../.git/index && > + git check-attr --cached --stdin --all < ../stdin-all | > + sort > actual && > + test_cmp ../specified-all actual > + > +' This is unfriendly to others who need to add more tests after this piece by contaminating their environment. A single-shot export would be more appropriate here: GIT_INDEX_FILE=../.git/index git check-attr --cached ...