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

Re: [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig

From
Jeff King <peff@peff.net>
Date
May 25, 2012, 20:11 UTC
Message-ID
<20120525201123.GB4364@sigill.intra.peff.net>
In-Reply-To
<vpqipfkrvsx.fsf@bauges.imag.fr>
On Fri, May 25, 2012 at 07:54:06PM +0200, Matthieu Moy wrote:
Show 5 quoted lines
> Having a $GIT_WORKTREE/.gitconfig file would be very nice, but raises a
> lot of security issues, so it's a much larger project (define which
> configuration values are allowed there, possibly take them into account
> at clone time, i.e. before checking out the files, and so on). Most
> likely out of the scope of my students' project ;-).

Yes, I have proposed it in multiple forms, and the discussion always ends in "gross, it's too complex".

If you really want to do it, the recommended way at this point is:
  # review for any issues (1)
  less .gitconfig
  # assuming it's OK, copy into place (2)
  cp .gitconfig .git/config-from-upstream
  # include it
  git config include.path config-from-upstream

And then repeat steps (1) and (2) whenever you want to update from upstream. That fixes not only the security issues, but also means that you won't accidentally drop back to some antique bogus config when you "git checkout $some_old_version".

-Peff
Previous: Matthieu MoyNext: Junio C Hamano
Message 12 of 26 in “[RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig”
  1. nguyenhu@minatec.inpg.frMay 25, 2012
  2. Jonathan NiederMay 25, 2012
  3. Matthieu MoyMay 25, 2012
  4. Jonathan NiederMay 25, 2012
  5. Hilco WijbengaMay 25, 2012
  6. Jonathan NiederMay 25, 2012
  7. Hilco WijbengaMay 25, 2012
  8. config doc: remove confusion about relative GIT_DIR from FILES sectionJonathan Nieder, May 25, 2012
  9. Jeff KingMay 25, 2012
  10. Junio C HamanoMay 25, 2012
  11. Matthieu MoyMay 25, 2012
  12. Jeff KingMay 25, 2012
  13. Junio C HamanoMay 25, 2012
  14. Jonathan NiederMay 25, 2012
  15. Junio C HamanoMay 25, 2012
  16. Jonathan NiederMay 25, 2012
  17. Junio C HamanoMay 25, 2012
  18. Matthieu MoyMay 25, 2012
  19. Jonathan NiederMay 25, 2012
  20. Matthieu MoyMay 25, 2012
  21. Jonathan NiederMay 25, 2012
  22. Jonathan NiederMay 25, 2012
  23. Matthieu MoyMay 25, 2012
  24. Matthieu MoyMay 25, 2012
  25. Felipe ContrerasMay 26, 2012
  26. Heiko VoigtMay 26, 2012

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.