{"thread":{"id":"14189","subject":"Ramifications of a git-sh-setup outside the PATH","startedAt":"2008-06-27T19:00:27Z","lastAt":"2008-06-28T12:01:21Z","messageCount":2,"participants":["Jonathan Nieder","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"81463","messageId":"20080627140027.BIA12244@m4500-01.uchicago.edu","threadId":"14189","inReplyTo":null,"subject":"Ramifications of a git-sh-setup outside the PATH","fromName":"Jonathan Nieder","fromEmail":"jrnieder@uchicago.edu","sentAt":"2008-06-27T19:00:27Z","receivedAt":"2008-06-27T19:00:27Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi gitsters,\n\nI noticed in the release notes to Git 1.6.0 that dashed-form commands\nare moving to a libexecdir outside the PATH. I have been using Git\nwith nd/dashless applied for about a month, and it does work well\n(thanks!). There was one little glitch: to use hg-fast-export.sh from\nfast-export.git (of repo.or.cz), I had to put git-sh-setup in the PATH.\n\nI wanted to just change the \". git-sh-setup\" line to \". git sh-setup\",\nbut of course that will not work. Am I missing something?\n\nhg-fast-export uses git-sh-setup to handle --help, to provide the\ncd_to_toplevel function, and to set GIT_DIR. It would not take much\nwork to avoid using git-sh-setup, although for my needs it was easier\nto put git-sh-setup in the PATH. But really, the use of git-sh-setup\ndoes not seem strange to me at all. Is use of git-sh-setup in scripts\noutside Git core discouraged?\n\nThe location of git-sh-setup was discussed before in the thread\n<http://thread.gmane.org/gmane.comp.version-control.git/33708>.\nThanks for your time, and thank you for Git!\n\nSincerely,\nJonathan\n"},{"id":"81551","messageId":"20080628120121.GB3489@steel.home","threadId":"14189","inReplyTo":"20080627140027.BIA12244@m4500-01.uchicago.edu","subject":"Re: Ramifications of a git-sh-setup outside the PATH","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-06-28T12:01:21Z","receivedAt":"2008-06-28T12:01:21Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Jonathan Nieder, Fri, Jun 27, 2008 21:00:27 +0200:\n> Hi gitsters,\n> \n> I noticed in the release notes to Git 1.6.0 that dashed-form commands\n> are moving to a libexecdir outside the PATH. I have been using Git\n> with nd/dashless applied for about a month, and it does work well\n> (thanks!). There was one little glitch: to use hg-fast-export.sh from\n> fast-export.git (of repo.or.cz), I had to put git-sh-setup in the PATH.\n> \n> I wanted to just change the \". git-sh-setup\" line to \". git sh-setup\",\n> but of course that will not work. Am I missing something?\n\nTry\n\n    . \"$(git --exec-path)/git-sh-setup\"\n\n\"git-sh-setup\" is not a command, but a Bourne Shell script you can use\nin your scripts by including it. So \". git sh-setup\" just tries to\n_include_ file \"git\" (and will try $PATH and current directory) with\npositional argument \"sh-setup\" (see man 1 bash, for example).\n"}]}