3

I would report this directly to the project responsible, but it's hard knowing which project would be responsible (Cygwin, Git, or Git for Windows which creates the git.exe I am using. This isn't Cygwin git, it's Git for Windows.)

Using the windows command prompt, git add -i [filename] works as expected. There's a slight hang before it shows the prompt, but nothing to be concerned about.

Using Cygwin (64), the same command just hangs indefinitely. After investigation I have determined that it launches a copy of perl.exe, which then maxes out a CPU but doesn't seem to return.

Here is another Git/Cygwin/Perl question, but unfortunately doesn't directly solve my issue: cygwin cannot exec 'git-add--interactive' permission denied

Stephen
  • 8,508
  • 12
  • 56
  • 96
  • do you use command console of mintty as terminal? – max630 Jul 24 '17 at 18:43
  • by cygwin, do you mean the environment installed independently of git for windows? Or part of that one? – max630 Jul 24 '17 at 18:44
  • When I say "Using Cygwin (64)" I mean using the Cygwin Terminal, which it appears is based on mintty. Don't understand your second question. – Stephen Jul 24 '17 at 19:00
  • It looks like the mintty makers warn against this, actually: "While native console programs with simple text output usually work fine, interactive programs often have problems," https://mintty.github.io/ – Stephen Jul 24 '17 at 19:01
  • 1
    And here in the git-for-windows Google Group it is recommended to avoid Git for Windows with Cygwin entirely, so I guess I have my answer: https://groups.google.com/forum/#!searchin/git-for-windows/cygwin%7Csort:relevance/git-for-windows/FR-Tr7AzLcI/lPxBDf91AwAJ – Stephen Jul 24 '17 at 19:09
  • A lot of changes have been made to git since 2017 (like rewriting some commands ([like rebase](https://github.com/git/git/blob/v2.20.0/Documentation/RelNotes/2.20.0.txt)) into a C implementation for instance). Is the problem described here still the case with newer git versions like 2.37.1? – hlovdal Aug 08 '22 at 20:19

1 Answers1

1

As I explained in "Why is it that if you download Git 2.0 from the net, you always get a 1.9.4 installer package?", you should not need cygwin anymore, you can use directly git bash, based on msys2.

If you have to use Cygwin, make sure your PATH only references Cygwin, and not Git for Windows as well, or the latter could interfer with the former.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Yeah, I just like Cygwin and wanted to start doing everything in there. But my company requires Git for Windows, both for security reasons and because it's the only thing that integrates into our version of Heroku. I am not sure what you mean by your last part, since the point was to call out to Git for Windows and have it work. – Stephen Jul 26 '17 at 01:07
  • @Stephen All you are doing in Cygwin can be done in a git bash though. It comes with 200+ Linux commands. – VonC Jul 26 '17 at 05:02
  • Thanks, I will give it a shot. Those commands are by virtue of MSYS2 right? – Stephen Jul 26 '17 at 13:42
  • @Stephen yes, 200+ Linux recompiled for Windows in `\mingw64\bin`, see https://stackoverflow.com/a/35619745/6309 for the path. – VonC Jul 26 '17 at 13:49