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

Re: t7005 and vi in GIT_EXEC_PATH

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 11, 2007, 16:28 UTC
Message-ID
<Pine.LNX.4.64.0711111622350.4362@racer.site>
In-Reply-To
<FCFF59B3-D3F1-4BEB-B3C3-D07DD5D5D8EF@silverinsanity.com>
Hi,
On Sun, 11 Nov 2007, Brian Gernhardt wrote:
Show 27 quoted lines
> On Nov 11, 2007, at 10:58 AM, Johannes Schindelin wrote:
> 
> > > If vi is in GIT_EXEC_PATH, then t7005-editor.sh fails because the 
> > > real vi is invoked instead of the test vi script.  This is because 
> > > the git wrapper puts GIT_EXEC_PATH ahead of ".".  I see no easy 
> > > solution to this problem, and thought I should bring it up with the 
> > > list.
> > 
> > I don't understand.  GIT_EXEC_PATH should be set to the build 
> > directory when you are running the tests.  Unless you copy vi _there_, 
> > you should not have any problem.
> 
> I'm sorry, I should have been more clear.  I was referring to the 
> GIT_EXEC_PATH build variable, not the environment variable.  The git 
> wrapper always adds the path determined during build to the front of 
> PATH.  When I was changing my build script, this got set to 
> "/usr/local/bin" (I usually use /usr/local/stow/git, instead).  Since I 
> have a /usr/local/bin/vim, PATH for git-commit.sh during the test was:
> 
> - my git build directory
> - /usr/local/bin (containing a symlink vi -> vim)
> - the t/trash directory, added by the test via `PATH=".:$PATH"` (containing
> the test vi script)
> - my normal path
> 
> The test appeared to hang when running it normally.  When I ran it with 
> -v, I saw that vim was started.

The obvious solution would be to copy "vi" into the git build directory for the test, or skip the test if that copy could not be performed.

Ciao, Dscho

Previous: Brian GernhardtNext: Junio C Hamano
Message 6 of 18 in “t7005 and vi in GIT_EXEC_PATH”
  1. Brian GernhardtNov 10, 2007
  2. David KastrupNov 10, 2007
  3. Brian GernhardtNov 10, 2007
  4. Johannes SchindelinNov 11, 2007
  5. Brian GernhardtNov 11, 2007
  6. Johannes SchindelinNov 11, 2007
  7. Junio C HamanoNov 11, 2007
  8. Use the best available exec path onlyBjörn Steinbrink, Nov 11, 2007
  9. Johannes SchindelinNov 11, 2007
  10. Jakub NarebskiNov 11, 2007
  11. Björn SteinbrinkNov 11, 2007
  12. Johannes SchindelinNov 11, 2007
  13. Junio C HamanoNov 11, 2007
  14. t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATHBjörn Steinbrink, Nov 11, 2007
  15. Johannes SchindelinNov 11, 2007
  16. Brian GernhardtNov 11, 2007
  17. Johannes SchindelinNov 11, 2007
  18. Björn SteinbrinkNov 11, 2007

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.