git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 ...
Previous: Jay Soffian
Message 11 of 11 in “Teach '--cached' option to check-attr”
  1. 1/2 Teach '--cached' option to check-attrJay Soffian, Sep 22, 2011
  2. 2/2 diff_index: honor in-index, not working-tree, .gitattributesJay Soffian, Sep 22, 2011
  3. Junio C HamanoSep 22, 2011
  4. Jay SoffianSep 23, 2011
  5. Jay SoffianSep 23, 2011
  6. Junio C HamanoSep 23, 2011
  7. Jay SoffianSep 23, 2011
  8. Junio C HamanoSep 23, 2011
  9. Michael HaggertySep 23, 2011
  10. Jay SoffianSep 23, 2011
  11. Junio C HamanoSep 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.