Work around the command line limit on Windows
commitc473d83bedee3b9cb25ce88f7b840d4df37d3a2d
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 11 Aug 2009 00:22:33 +0000 (11 02:22 +0200)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Tue, 19 Jun 2012 22:22:53 +0000 (19 23:22 +0100)
treed9928667ea079b6d0c2fa2dcabc1e80d719ceb58
parent372187fd8e067a7a5b959a47115db41b043fe212
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