Re: [PATCH 1/2] Teach '--cached' option to check-attr
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2011, 23:36 UTC
- Message-ID
- <7vzkhww3n6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1316727861-90460-1-git-send-email-jaysoffian@gmail.com>
Jay Soffian <jaysoffian@gmail.com> 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.
Show 8 quoted lines
> +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 ...