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

Re: [PATCH] introduce git root

From
Christian Couder <christian.couder@gmail.com>
Date
Dec 1, 2014, 04:17 UTC
Message-ID
<CAP8UFD2jES1i+6zOt1gXqTWFy1UHu2GBwAisQktd_Ymbj9Db2g@mail.gmail.com>
In-Reply-To
<xmqqd284rryz.fsf@gitster.dls.corp.google.com>
On Mon, Dec 1, 2014 at 4:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
>
> If I were redoing this today, I would probably nominate the "git"
> potty as such a "kitchen synk" command.  We have "--man-path" that
> shows the location of the manual pages, "--exec-path[=path]" that
> either shows or allows us to override the path to the subcommands,
> and "--show-prefix", "--show-toplevel", and friends may feel quite
> at home there.

I wonder if we could reuse "git config" which is already a "kitchen synk" command to get/set a lot of parameters. Maybe we could dedicate a "git" or "virtual" or "proc" or "sys" (like /proc or /sys in Linux) namespace for these special config parameters that would not necessarily reflect something in the config file.

"git config git.man-path" would be the same as "git --man-path". "git config git.root" would be the same as "git rev-parse --show-toplevel". "git config git.exec-path mypath" would allow us to override the path to the subcommands, probably by saving something in the config file.

If we wanted for example to try just once a special exec-path we could use:
git -c git.exec-path=/path/to/git-foo foo

Best, Christian.

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 23 in “introduce git root”
  1. introduce git rootArjun Sreedharan, Nov 29, 2014
  2. Philip OakleyNov 29, 2014
  3. Arjun SreedharanNov 30, 2014
  4. Matthieu MoyNov 30, 2014
  5. Junio C HamanoDec 1, 2014
  6. Christian CouderDec 1, 2014
  7. Junio C HamanoDec 1, 2014
  8. Jeff KingDec 2, 2014
  9. Christian CouderDec 2, 2014
  10. Junio C HamanoDec 2, 2014
  11. Jeff KingDec 4, 2014
  12. Junio C HamanoDec 4, 2014
  13. Matthieu MoyDec 4, 2014
  14. Junio C HamanoDec 4, 2014
  15. Jeff KingDec 4, 2014
  16. Junio C HamanoDec 4, 2014
  17. Christian CouderDec 5, 2014
  18. Jeff KingDec 5, 2014
  19. Christian CouderDec 7, 2014
  20. Junio C HamanoDec 9, 2014
  21. Christian CouderDec 10, 2014
  22. Jeff KingDec 10, 2014
  23. Junio C HamanoDec 10, 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.