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

Re: GIT on MinGW problem

From
Marius Storm-Olsen <marius@trolltech.com>
Date
May 29, 2007, 14:36 UTC
Message-ID
<465C3A88.3090606@trolltech.com>
In-Reply-To
<465C2999.677860A6@eudaptics.com>
Johannes Sixt said the following on 29.05.2007 15:24:
Show 11 quoted lines
>> Looking at the docs for cmd's call (run 'help call'), I see now that
>> it can be written
>>      %~dp0gitk
>> as well..
> 
> But... the docs also say that this stuff is only available if command
> extensions are turned on. Are they on by default?
> 
> (I cannot tell because I remember faintly that I fiddled with the
> corresponding registry setting in the past, but don't know whether it
> was on or off at the beginning.)

Ok, MSDN says it on by default on XP, while other docs say its on by default without specifying any platforms. Also, it might be that the %~dp0 construct is only supported on later versions of the cmd extension too (I don't have NT 4, so I can't test this), so to be on the safe side you can do this:

---- @echo off REM This GOTO relies on the hack that command.com only supports REM 8 character labels, so it reads 'goto _Windows' goto :_WindowsNT

REM Command.com jumps here :_Windows wish84.exe "C:\Git\usr\bin\gitk" %1 %2 %3 %4 %5 %6 %7 %8 %9 REM NOTE! If you install Git in some other path, and use REM command.com, you need to replace the path above

goto :EOF
REM Cmd.exe jumps here
:_WindowsNT
if "%1" neq "ensureExt" (
    REM Call the script again with cmd /X to explicitly turn on Command Extensions
    %COMSPEC% /X /C "%0 ensureExt %*"
    goto :EOF
)
REM If our CMD Extension version is less than 2, we might not support the %~dp0
REM construct so, just do the normal _Windows call instead. (This should only
REM happen on old Windows NT 4, where the extension is not so sophisticated
if not cmdextversion 2 (
    call :_Windows %2 %3 %4 %5 %6 %7 %8 %9
    goto :EOF
)
start wish84.exe "%~dp0gitk" %2 %3 %4 %5 %6 %7 %8 %9
:EOF
-- 
.marius
Previous: Johannes SixtNext: Johannes Schindelin
Message 53 of 69 in “GIT on MinGW problem”
  1. Aaron GrayMay 12, 2007
  2. Junio C HamanoMay 12, 2007
  3. Aaron GrayMay 12, 2007
  4. Han-Wen NienhuysMay 12, 2007
  5. Johannes SixtMay 25, 2007
  6. Marco CostalbaMay 25, 2007
  7. Johannes SchindelinMay 25, 2007
  8. Johannes SixtMay 25, 2007
  9. Han-Wen NienhuysMay 26, 2007
  10. Johannes SchindelinMay 26, 2007
  11. Han-Wen NienhuysMay 27, 2007
  12. Johannes SchindelinMay 27, 2007
  13. Han-Wen NienhuysMay 27, 2007
  14. NixMay 28, 2007
  15. Han-Wen NienhuysMay 27, 2007
  16. Aaron GrayMay 25, 2007
  17. Han-Wen NienhuysMay 26, 2007
  18. Johannes SchindelinMay 26, 2007
  19. Junio C HamanoMay 26, 2007
  20. Johannes SchindelinMay 26, 2007
  21. Han-Wen NienhuysMay 26, 2007
  22. Jakub NarebskiMay 26, 2007
  23. Han-Wen NienhuysMay 27, 2007
  24. Shawn O. PearceMay 27, 2007
  25. Han-Wen NienhuysMay 27, 2007
  26. Steven GrimmMay 27, 2007
  27. Jakub NarebskiMay 27, 2007
  28. Han-Wen NienhuysMay 27, 2007
  29. Johannes SchindelinMay 28, 2007
  30. Han-Wen NienhuysMay 28, 2007
  31. Johannes SchindelinMay 27, 2007
  32. Han-Wen NienhuysMay 27, 2007
  33. GIT on MinGW, with tcltk for gitkHan-Wen Nienhuys, May 27, 2007
  34. Aaron GrayMay 27, 2007
  35. Han-Wen NienhuysMay 27, 2007
  36. Aaron GrayMay 27, 2007
  37. Aaron GrayMay 27, 2007
  38. Han-Wen NienhuysMay 27, 2007
  39. Aaron GrayMay 27, 2007
  40. Han-Wen NienhuysMay 27, 2007
  41. Aaron GrayMay 27, 2007
  42. Johannes SchindelinMay 27, 2007
  43. Johannes SixtMay 29, 2007
  44. Han-Wen NienhuysMay 27, 2007
  45. Johannes SixtMay 29, 2007
  46. Marius Storm-OlsenMay 29, 2007
  47. Johannes SixtMay 29, 2007
  48. Han-Wen NienhuysMay 29, 2007
  49. Johannes SixtMay 29, 2007
  50. Johannes SchindelinMay 29, 2007
  51. Marius Storm-OlsenMay 29, 2007
  52. Johannes SixtMay 29, 2007
  53. Marius Storm-OlsenMay 29, 2007
  54. Johannes SchindelinMay 29, 2007
  55. Johannes SixtMay 29, 2007
  56. Nguyen Thai Ngoc DuyMay 29, 2007
  57. Johannes SixtMay 29, 2007
  58. Nguyen Thai Ngoc DuyMay 29, 2007
  59. Make git-k an alias to gitkJohannes Schindelin, May 30, 2007
  60. Johannes SixtMay 30, 2007
  61. Han-Wen NienhuysMay 30, 2007
  62. Johannes SchindelinMay 30, 2007
  63. Shawn O. PearceMay 30, 2007
  64. Git wrapper: add --redirect-stderr optionJohannes Schindelin, May 30, 2007
  65. Shawn O. PearceMay 30, 2007
  66. Johannes SchindelinMay 30, 2007
  67. Shawn O. PearceMay 30, 2007
  68. Johannes SchindelinMay 30, 2007
  69. Johannes SchindelinMay 27, 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.