Author Topic: git commands in sub folders with cygwin not working.  (Read 2375 times)

DMadsen

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
git commands in sub folders with cygwin not working.
« on: December 04, 2016, 12:11:02 am »
I am having problems using the git commands within slickedit for files that are in folders other than the root for the repository. I am using cygwin for git. It appears the path is not getting sent to git correctly.
Any suggestions?

jporkkahtc

  • Senior Community Member
  • Posts: 1901
  • Hero Points: 184
  • Text
Re: git commands in sub folders with cygwin not working.
« Reply #1 on: December 04, 2016, 01:45:12 am »
Have you tried using non-cygwin git for windows?
Thats what I've been using, and it works great.


DMadsen

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: git commands in sub folders with cygwin not working.
« Reply #2 on: December 04, 2016, 03:03:47 pm »
Yes, I confirmed that git for Windows works fine. I have been using cygwin for other reasons for several years, have the command line git working very well with cygwin, and did not want to switch or have two different environments to utilize the git features in SlickEdit.
 

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2440
  • Hero Points: 137
Re: git commands in sub folders with cygwin not working.
« Reply #3 on: December 05, 2016, 02:14:27 pm »
Let me check on this.  I have tested with the Cygwin Git, but more recently I've used the non-Cygwin one.

mjdl

  • Senior Community Member
  • Posts: 145
  • Hero Points: 17
  • SE 24.0.2.0 x64 Windows 10 x64 v1909
Re: git commands in sub folders with cygwin not working.
« Reply #4 on: December 05, 2016, 05:47:48 pm »
I am having problems using the git commands within slickedit for files that are in folders other than the root for the repository. I am using cygwin for git. It appears the path is not getting sent to git correctly.
Any suggestions?
I'm not a Git user, but I did try it a few months ago with Slickedit via Cygwin and via the Nuwen MinGW no-installation-necessary unzip-the-file package. (git version 2.8.3.windows.1)

My somewhat hasty and not-totally-informed result: Slickedit has no notion of the peculiar form of Cygwin file-path, i.e. the Cygwin prefix totally confuses the parsing and construction Slickedit must do to assemble the Git command lines. Unless Slickedit centralizes that business in one place in its macro files, I don't see the problem of special-casing Cygwin commands in the MS Windows Slickedit version being resolved very easily.

The Nuwen package seemed to work well with Slickedit on the (very!) little testing I gave it: simply add the location of the Nuwen Git binaries to the %PATH% (e.g. C:\SDK\MinGW\git\cmd;), and you're off to the races... no other system changes required.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2440
  • Hero Points: 137
Re: git commands in sub folders with cygwin not working.
« Reply #5 on: December 07, 2016, 01:58:28 pm »
It looks like with the Cygwin Git, the paths are the problem (as the other user suggested).  So some things will work and some won't. The big one is the GUI update is a little out of sorts - it showed me a reasonable list of different files, but the path is wrong, so commit won't work.

The best things I can suggest are probably to try the package that mjdl suggested, or could you use the Windows Git and point it to the same config you used for Cygwin?

mjdl

  • Senior Community Member
  • Posts: 145
  • Hero Points: 17
  • SE 24.0.2.0 x64 Windows 10 x64 v1909
Re: git commands in sub folders with cygwin not working.
« Reply #6 on: December 08, 2016, 02:11:34 am »
One of the issues I had during my brief Cygwin/Git excursion was the difference between $HOME on the Cygwin side (e.g. /home/mjdl) and %USERPROFILE% on the Windows side (e.g. C:\Users\mjdl). Cygwin and Windows versions of git ended up up using different .gitconfig dot files, not a tenable solution.
I don't recall all the various things I tried to get the Cygwin $HOME to point to %USERPROFILE% (I seem to remember that simply setting %HOME% on the Windows side was not enough), but eventually I used mklink.exe in windows to create a directory symbolic link from /home/mjdl to C:\Users\mjdl so that running Cyggwin pwd in $HOME now shows result /cygdrive/c/Users/mjdl, and all the various dotfiles Unix programs use are mixed in the Windows %USERPROFILE%. I'm not sure if that's a good solution for anyone else.


DMadsen

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: git commands in sub folders with cygwin not working.
« Reply #7 on: December 08, 2016, 03:33:33 pm »
Thanks for looking into this and for the suggestions. I have it working "satisfactorily" while using the cygwin environment for my other needs and pointing git for windows to the cygwin setup and slickedit to git for windows. A bit of a kludge but it is working.
Thanks.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2440
  • Hero Points: 137
Re: git commands in sub folders with cygwin not working.
« Reply #8 on: December 08, 2016, 03:40:35 pm »
OK.  You could set those environment variables up in your SlickEdit workspace if that feels any cleaner to you.  That way you wouldn't have to have them set globally.

Have you tried the Repository Browser?