Work around the command line limit on Windows
commite4f613513ed773c8876b24420f27d44b67e71045
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 11 Aug 2009 00:22:33 +0000 (11 02:22 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 3 May 2012 15:32:43 +0000 (3 10:32 -0500)
treeeebee9c1eb77a2eff2123d91a7c902019a5650f0
parentdc3ade22b4b03753ef80a91b0ae52a55cd979b92
Work around the command line limit on Windows

On Windows, there are dramatic problems when a command line grows
beyond PATH_MAX, which is restricted to 8191 characters on XP and
later (according to http://support.microsoft.com/kb/830473).

Work around this by just cutting off the command line at that length
(actually, at a space boundary) in the hope that only negative
refs are chucked: gitk will then do unnecessary work, but that is
still better than flashing the gitk window and exiting with exit
status 5 (which no Windows user is able to make sense of).

The first fix caused Tcl to fail to compile the regexp, see msysGit issue
427. Here is another fix without using regexp, and using a more relaxed
command line length limit to fix the original issue 387.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
gitk-git/gitk