Work around the command line limit on Windows
commit781f05227e1b393c918120973d431b29c677e9cd
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 11 Aug 2009 00:22:33 +0000 (11 02:22 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 8 Jan 2011 14:15:23 +0000 (8 15:15 +0100)
tree67af3c983af6188f57e962d02d945bd6d5cf859a
parentc94b8cb76ca8a61df7d30db12e6075573373ea6f
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