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

Re: [RFC/PATCH 1/2] config: Add safe-include directive

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 3, 2014, 18:52 UTC
Message-ID
<xmqqsij5kmte.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPc5daV_txE9NrwvH5VWhXK+UmE7Avy8R2QaZaX0SsTC_+TU-A@mail.gmail.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Even though I did allude to ../project.gitconfig in the original message, I
> think there should probably be an explicit syntax to name a path that is
> relative to the root level of the working tree. People do funky things using
> $GIT_DIR and $GIT_WORK_TREE to break the ".. relative to the config
> file is the root level of the working tree" assumption, and also a repository
> can have a regular file ".git" that points at the real location of the directory
> that has "config" in it, in which case its parent directory is very unlikely to
> be the root level of the working tree.

There is another reason why I suspect that it may make the resulting system more useful if we had a way to explicitly mark the path you used to safeInclude (by the way, we do not do dashes in names for configuration by convention) as referring to something inside the project's working tree. In a bare repository, we might want to grab the blob at that path in HEAD (i.e. the project's primary branch) and include its contents.

Previous: Junio C HamanoNext: Rasmus Villemoes
Message 11 of 14 in “project wide: git config entry for [diff] renames=true”
  1. Joe PerchesSep 25, 2014
  2. Jeff KingSep 25, 2014
  3. Joe PerchesSep 25, 2014
  4. Junio C HamanoSep 25, 2014
  5. Junio C HamanoSep 25, 2014
  6. Junio C HamanoSep 25, 2014
  7. 0/2 Introduce safe-include config featureRasmus Villemoes, Oct 3, 2014
  8. 1/2 config: Add safe-include directiveRasmus Villemoes, Oct 3, 2014
  9. Junio C HamanoOct 3, 2014
  10. Junio C HamanoOct 3, 2014
  11. Junio C HamanoOct 3, 2014
  12. Rasmus VillemoesOct 6, 2014
  13. Junio C HamanoOct 6, 2014
  14. 2/2 config: Add test of safe-include featureRasmus Villemoes, Oct 3, 2014

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.