Work around the command line limit on Windows
commit82f3e26e7b70d0eea82fd997b3d732c82e38de6c
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, 17 Feb 2011 12:35:10 +0000 (17 13:35 +0100)
tree211de84bc02fb43554962f7d947e730138da0ae9
parent2eeeab047c85956764f2d30fbe6f5e0a84befcb8
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