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

Re: cvs import and internal plumbing commands

From
Antony Stubbs <antony.stubbs@gmail.com>
Date
Jul 21, 2009, 23:24 UTC
Message-ID
<24155F0E-E467-48EC-9E83-254877B4E786@gmail.com>
In-Reply-To
<20090720153400.GE5347@coredump.intra.peff.net>

But regardless, surely calling straight into git is simpler/nicer and more likely to just work (as on OSX)?

 From the 1.6.0 release notes (http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.6.0.txt 
):
"""With the default Makefile settings, most of the programs are now
installed outside your $PATH, except for "git", "gitk" and some server  
side programs that need to be accessible for technical reasons.  
Invoking a git subcommand as "git-xyzzy" from the command line has  
been deprecated since early 2006 (and officially announced in 1.5.4  
release notes); use of them from your scripts after adding output from  
"git --exec-path" to the $PATH is still supported in this release, but  
users are again strongly encouraged to adjust their scripts to use  
"git xyzzy" form, as we will stop installing "git-xyzzy" hardlinks for  
built-in commands in later releases. """

note the "but users are again strongly encouraged to adjust their scripts to use "git xyzzy" form". Why not just apply the patch and be done with it?

-Antony
On 21/07/2009, at 3:34 AM, Jeff King wrote:
Show 32 quoted lines
> On Sun, Jul 19, 2009 at 07:43:28PM -0700, Junio C Hamano wrote:
>
>> We encourage script writers to just prepend "git --exec-path" at the
>> beginning of their PATH and give guarantee that this simple  
>> procedure will
>> keep their scripts working, so it might be a good idea to have an  
>> example
>> for that as well.
>
> I had it in my head that such a strategy was supposed to be a  
> temporary
> step in the process of getting rid of dashed forms. That is, you can  
> do
> that now to avoid having your scripts break, but in the long run, you
> should be converting to the space form.
>
> But I guess the plan was softened, and we have no deprecation plan for
> dashed forms in exec-path. So maybe my thinking was outdated.
>
>> So the preferred fix might be just the matter of adding one line
>>
>> 	$ENV{'PATH'} = `git --exec-path`. ":$ENV{'PATH'}";
>>
>> at the beginning of the script.
>
> I can see that for a totally third-party script which wanted to use  
> git
> plumbing.  But why do that for a git-* script? The "git" wrapper  
> sets up
> the environment like that already.
>
> -Peff
Previous: Jeff KingNext: Junio C Hamano
Message 11 of 14 in “cvs import and internal plumbing commands”
  1. Antony StubbsJul 5, 2009
  2. Antony StubbsJul 5, 2009
  3. 1/1 Re: cvs import and internal plumbing commandsastubbs, Jul 6, 2009
  4. Jeff KingJul 16, 2009
  5. Antony StubbsJul 17, 2009
  6. Jeff KingJul 17, 2009
  7. Antony StubbsJul 17, 2009
  8. Antony StubbsJul 19, 2009
  9. Junio C HamanoJul 20, 2009
  10. Jeff KingJul 20, 2009
  11. Antony StubbsJul 21, 2009
  12. Junio C HamanoJul 22, 2009
  13. Jeff KingJul 22, 2009
  14. Junio C HamanoJul 22, 2009

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.