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

Already on GitHub? Sign in to your account

Windows build #92

rchl opened this Issue Oct 5, 2012 · 17 comments


None yet
5 participants

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.

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 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. :)

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 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.

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


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.

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 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 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 commented Oct 12, 2012

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

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 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 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 commented Aug 25, 2013

When new tig will be available for cygwin?


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/jonas/tig/issues/92#issuecomment-23226065

Jonas Fonseca

@jonas jonas added a commit that referenced this issue Aug 27, 2013

@jonas jonas Optionally load HEAD when loading references
This avoids one fork+exec and improves the start-up time on Cygwin.

References #92

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 jonas closed this May 9, 2014

@Kirill Kirill referenced this issue in git-for-windows/git Sep 12, 2017


Add console enhancement - tig #1294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment