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

Re: [PATCH 1/2] Introduce git-run-with-user-path helper program.

From
JHJunio C Hamano <junio@siamese.dyndns.org>
Date
May 17, 2005, 21:18 UTC
Message-ID
<7v4qd1tuud.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050517203500.GH7136@pasky.ji.cz>
>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:

PB> Actually, my doubts about general usefulness of this wrapper are PB> growing. Cogito is unlikely to ever make use of it since it has to PB> figure out the .git location anyway for own use (it keeps plenty of own PB> files there).

I think "having to figure out .git anyway" is backwards, if your plan is to make Cogito take filesystem paths as opposed to GIT paths. If the plan for Cogito is to take always GIT paths, which is a sensible way as well, then it is irrelevant for the implementation of Cogito, but then it becomes useful for users of Cogito).

If your plan is to make Cogito take filesystem paths, then you can move bulk of the code currently in cg-blah, except the part that picks up non-path parameters, to cg-Xblah, and reduce cg-blah implementation down to just:

    ... parse options by shifting "$@" out.
    ... then
    git-run-with-user-path cg-Xblah $non-path-opts -- "$@"

and you can rip "the code to figure out .git" out from cg-Xblah. There is nothing to figure out at that point; it always is ${GIT_DIR-.git}/.

Previous: Petr BaudisNext: Petr Baudis
Message 5 of 15 in “Introduce git-run-with-user-path helper program.”
  1. 1/2 Introduce git-run-with-user-path helper program.Junio C Hamano, May 16, 2005
  2. Petr BaudisMay 17, 2005
  3. Junio C HamanoMay 17, 2005
  4. Petr BaudisMay 17, 2005
  5. Junio C HamanoMay 17, 2005
  6. Petr BaudisMay 17, 2005
  7. Junio C HamanoMay 17, 2005
  8. Petr BaudisMay 18, 2005
  9. Junio C HamanoMay 18, 2005
  10. Petr BaudisMay 18, 2005
  11. Junio C HamanoMay 18, 2005
  12. Linus TorvaldsMay 19, 2005
  13. Junio C HamanoMay 19, 2005
  14. Thomas GlanzmannMay 19, 2005
  15. Junio C HamanoMay 19, 2005

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.