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

.gitattributes lookup doesn't respect GIT_WORK_TREE

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Apr 15, 2018, 19:04 UTC
Message-ID
<877ep8p9yz.fsf@linux-m68k.org>

The functions in attr.c do not look at $GIT_WORK_TREE when trying to find the .gitattributes file. Thus if you are not inside the work tree, but have GIT_WORK_TREE set attribute lookup will be wrong.

Password Store <http://www.passwordstore.org/> is using this feature when the password store is a git repository. It sets up a diff attribute that decrypts the contents, but that works only if the command is issued while inside the repository.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Next: Junio C Hamano
Message 1 of 4 in “.gitattributes lookup doesn't respect GIT_WORK_TREE”
  1. Andreas SchwabApr 15, 2018
  2. Junio C HamanoApr 15, 2018
  3. Andreas SchwabApr 15, 2018
  4. Duy NguyenApr 16, 2018

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.