gitk: work around ridiculous command line restriction on Windows
commit56a4a1237f8892d1d36d4c45e4b14683dfd2a8c4
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 11 Aug 2009 00:22:33 +0000 (11 02:22 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 7 Apr 2010 20:10:39 +0000 (7 22:10 +0200)
tree330fc053065e47f1b6fb952e8e787d643fac70bc
parentc468c93eec068e4230bdd6b0d8bff49941c102e8
gitk: work around ridiculous command line restriction 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).

This fixes msysGit issue 387.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
gitk-git/gitk