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

Re: [PATCH 2/2] Make Git respect changes to .gitattributes during checkout.

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 12, 2009, 09:59 UTC
Message-ID
<49B8DD1D.3060908@viscovery.net>
In-Reply-To
<1236850575-27973-3-git-send-email-kristian.amlie@nokia.com>
Kristian Amlie schrieb:
> We do this by popping off elements on the attribute stack, until we
> reach the level where a new .gitattributes was checked out. The next
> time someone calls git_checkattr(), it will reconstruct the
> attributes from that point.
...
> +	gitattrlen = strlen(GITATTRIBUTES_FILE);
> +	pathlen = strlen(path);
> +	if (!strncmp(path + pathlen - gitattrlen, GITATTRIBUTES_FILE, gitattrlen)) {
> +		/* Invalidate attributes if a new .gitattributes file was checked out. */

But if there was file .abc.txt that was checked out before .gitattributes was checked out, then the new .gitattributes won't have been used for .abc.txt, yet, right?

(Disclaimer: I didn't read the code, just your description and this comment.)
-- Hannes
Previous: Kristian AmlieNext: Kristian Amlie
Message 9 of 22 in “Honoring a checked out gitattributes file”
  1. Kristian AmlieJan 28, 2009
  2. Michael J GruberJan 28, 2009
  3. Kristian AmlieJan 28, 2009
  4. Kristian AmlieJan 30, 2009
  5. Add a test for checking whether gitattributes is honored by checkout.Kristian Amlie, Jan 30, 2009
  6. Kristian AmlieMar 12, 2009
  7. 1/2 Add a test for checking whether gitattributes is honored by checkout.Kristian Amlie, Mar 12, 2009
  8. 2/2 Make Git respect changes to .gitattributes during checkout.Kristian Amlie, Mar 12, 2009
  9. Johannes SixtMar 12, 2009
  10. Kristian AmlieMar 12, 2009
  11. Kristian AmlieMar 13, 2009
  12. 1/2 Add a test for checking whether gitattributes is honored by checkout.Kristian Amlie, Mar 13, 2009
  13. 2/2 Make Git respect changes to .gitattributes during checkout.Kristian Amlie, Mar 13, 2009
  14. Junio C HamanoMar 14, 2009
  15. Kristian AmlieMar 19, 2009
  16. Junio C HamanoMar 19, 2009
  17. Kristian AmlieMar 20, 2009
  18. Add a test for checking whether gitattributes is honored by checkout.Kristian Amlie, Mar 20, 2009
  19. Junio C HamanoMar 14, 2009
  20. Matthieu MoyMar 12, 2009
  21. Kristian AmlieMar 12, 2009
  22. Jeff KingJan 28, 2009

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.