Code

gitk: Make .gitk a hidden file under windows
authorPaul Mackerras <paulus@samba.org>
Mon, 23 Mar 2009 10:37:51 +0000 (21:37 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 17 Apr 2009 12:47:48 +0000 (22:47 +1000)
This sets the hidden attribute on the ~/.gitk file so it doesn't
appear in the windows user profile.

Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk

diff --git a/gitk b/gitk
index bdd12236b86e7fbcd4314afb32c3e603037c648e..0bc2f30929326dbad9f0c9cb75ad5fe138a5ce9c 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -2519,6 +2519,9 @@ proc savestuff {w} {
     if {![winfo viewable .]} return
     catch {
        set f [open "~/.gitk-new" w]
+       if {$::tcl_platform(platform) eq {windows}} {
+           file attributes "~/.gitk-new" -hidden true
+       }
        puts $f [list set mainfont $mainfont]
        puts $f [list set textfont $textfont]
        puts $f [list set uifont $uifont]