Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build #92

Closed
rchl opened this issue Oct 5, 2012 · 18 comments
Closed

Windows build #92

rchl opened this issue Oct 5, 2012 · 18 comments

Comments

@rchl
Copy link

rchl commented Oct 5, 2012

I'm happily using tig on Windows which I've installed together with Cygwin but that is pretty ancient version 0.15. There seems to be nothing newer available. Did it become significantly harder to build later versions so nobody did it? Or there is just no interest?

I wonder if something could be done about it. If not by the author then maybe someone else could contribute a build based on new code.

@CyberShadow
Copy link

Attempting to build on msys/mingw fails, because sys/wait.h does not exist on mingw. It appears to be POSIX-specific.

Attempting to build on cygwin succeeds. However, tig is much slower than gitk.

My startup time measurements, from the moment I press Enter until the whole screen is populated with the log:

  • gitk takes about 1.2 seconds;
  • tig takes about 4.5 seconds.

@rchl
Copy link
Author

rchl commented Oct 8, 2012

0.15 running in cygwin is not a speed demon either. But it is much more than textual gitk clone so people could probably live with it.

Maybe it's worth to write some guide on how to compile it on Windows? Or put up binaries somewhere? Ideally both. :)

@CyberShadow
Copy link

Compiling with cygwin is easy, you just need to install the package dependencies. I don't know the exact list, but it includes gcc, libncurses, autoconf and automake. Then, it's ./autogen.sh and the usual ./configure / make / make install.

But it is much more than textual gitk clone so people could probably live with it.

Is there a faster textual gitk clone? Because that's pretty much exactly what I'm looking for. A text-mode commit tool that has keyboard navigation and allows adding individual files/chunks/lines would be great too.

@rchl
Copy link
Author

rchl commented Oct 8, 2012

I had many problems with compiling because:
a) I haven't realized that I was running msysgit bash rather than cygwin (I have both installed)
b) even after switching to cygwin, some binaries were picked up from msysgit /bin directory (had to remove it from path)

But after solving those and installing some dependencies, it compiled nicely indeed.
This issue can probably be closed now.

Is there a faster textual gitk clone?

I don't know other tools really.

@CyberShadow
Copy link

I think you shouldn't have those problems if you use the shortcut created by cygwin's setup tool to start cygwin bash.

@jonas
Copy link
Owner

jonas commented Oct 9, 2012

Regarding slowness, I remember a Cygwin user requesting whether it would be possible to avoid loading the commit diff each time the cursor is moved in the main view, since fork+exec can be slow in Cygwin. A lazy navigation mode which fixes this has been added in commit c0cb28f.

What other speed issues are you seeing? Is it mainly at start-up time? You need to be more specific, if you want me to be able to do something about it. Also, version 0.15 is veeeery old (almost three years) and a lot of improvements in speed has been added. For example, as of commit 6d276a6, tig no longer asks for move/copy detection.

@CyberShadow
Copy link

Everything is slow. When the diff is open, it takes about a second for it to update after moving the cursor. You can actually see it drawing things on the screen, like on ancient monitors.

However, I think most of this would probably be because curses on cygwin is slow, and cygwin is slow in general. Process creation is much slower on Windows as well - if gitk is using internal git commands (i.e. not via the git.exe / git.cmd entry point), it has an advantage.

Ideally, a Windows port of tig would use something like libgit2 instead of spawning processes whenever possible. A compromise would be a mingw port, which would require replacing POSIX-specific APIs (such as sys/wait.h) with Windows ones.

@jonas
Copy link
Owner

jonas commented Oct 9, 2012

gitk is using git.exe provided plumbing for most but has a couple of tricks to speed up things that I didn't yet try to integrate into tig. Also, since gitk is shipped with git it can make assumptions regarding new git features which are faster.

I have thought about switching to libgit2, but I do not have the time for such a task at this time. Replacing POSIX APIs should be pretty simple since all process management is done in one file: io.c. Based on this, I would say that the last option is preferable at this point.

@rchl
Copy link
Author

rchl commented Oct 9, 2012

It's certainly not unusably slow for me (both 0.15 version that I was using until now and now also 1.0x). I would rather think it mostly has to do with git being slower on Windows than on other platforms.
SSD helps a lot for those problems.

@jonas
Copy link
Owner

jonas commented Oct 12, 2012

OK, I got the impression that tig was unbearably slow compared to gitk.

@rchl
Copy link
Author

rchl commented Aug 21, 2013

Recently cygwin 64-bit was released (http://www.cygwin.com). I'd really like to use it because it seems to fix some git issues I'm having, but the list of packages for 64-bit version does not include tig. I've tried building it (which I do for 32-bit anyway to have the latest version) but I'm unable to do it due to configure script not finding ncurses. Did someone by any chance have stumbled upon this problem and knows how to solve it? I'm not fluent in make.

I have libncurses installed. I think the problem might have something to do with there being no libncurses_w_ installed (or available) but I believe that in 64-bit mode, the libncurses is actually the version with wide character support so "w" shouldn't be needed, I think.

(I'll provide more info later, after I retry my attempt)

@jonas
Copy link
Owner

jonas commented Aug 22, 2013

@rchl I will take a look tomorrow and see if I can get it to compile on Cygwin 64-bit.

@rchl
Copy link
Author

rchl commented Aug 25, 2013

Actually I have tried again and succeeded without any problems this time. :)
Not sure what fixed it, I've done the whole procedure (including cygwin installation) from scratch.

@dmalikov
Copy link
Contributor

When new tig will be available for cygwin?

@jonas
Copy link
Owner

jonas commented Aug 25, 2013

I do not maintain the tig package on Cygwin, so I believe you have to ask
on the Cygwin maling list.

On Sun, Aug 25, 2013 at 7:29 AM, Dmitry Malikov notifications@github.comwrote:

When new tig will be available for cygwin?


Reply to this email directly or view it on GitHubhttps://github.com//issues/92#issuecomment-23226065
.

Jonas Fonseca

jonas added a commit that referenced this issue Aug 27, 2013
This avoids one fork+exec and improves the start-up time on Cygwin.

References #92
@ruchengtang
Copy link

Install tig1.2.1 on Windows with Cygwin http://www.tangrucheng.com/installation-tig-under-linux-and-windows-cygwin.html

@jonas
Copy link
Owner

jonas commented May 9, 2014

Closing this to clean up the issue database. Version 2.x has some improvements targeting Cygwin, however, any plans for Cygwin this version of Tig or any version for that matter should be discussed upstream.

@jonas
Copy link
Owner

jonas commented Sep 27, 2017

FWIW, tig is now offered by Git for Windows: https://github.com/git-for-windows/git/releases/tag/v2.14.2.windows.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants