Skip to contentSkip to conversation

gitk: Avoid issues with script path format

PATCH New Steven Penny 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitk: Avoid issues with script path format

Tk’s "wish" for Windows can be built two ways

win this provides a "wish" that uses GDI; it only understands Windows
paths such as C:\foo\bar
unix this provides a "wish" that uses X11; it understands Windows and Cygwin
paths such as C:\foo\bar or /foo/bar

Some Cygwin users will prefer to use the "win" version, as it avoids the large X11 dependency. However Cygwin passes the path "/bin/gitk" or similar and the "win" version of "wish" will not understand this. However "wish" does understand STDIN. Options such as "--all" will still work using this method as well.

---
 gitk-git/gitk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
gitk-git/gitk +1 -1
index 90764e8..64a125d 100755
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Tcl ignores the next line -*- tcl -*- \
-exec wish "$0" -- "$@"
+exec wish < "$0" -- "$@"
 
 # Copyright © 2005-2014 Paul Mackerras.  All rights reserved.
 # This program is free software; it may be used, copied, modified
Signature · 1 line
1.8.5.2