git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: .gitk should created hidden in windows

From
Paul Mackerras <paulus@samba.org>
Date
Mar 23, 2009, 10:37 UTC
Message-ID
<18887.26239.115820.450313@cargo.ozlabs.ibm.com>
In-Reply-To
<49BFA97A.1030203@lanwin.de>
Steve Wagner writes:
Show 8 quoted lines
> The problem is that windows dose not hides files beginning with a dot as
> it is in unix. So the .gitk file is created as visible in the windows
> user profile. Problematic too is that i can no set the hidden attribute
> to this file, because it is recreated every time i start gitk, so the
> hidden attribute gets lost.
> 
> Can you control this and create the file with the hidden attribute on
> windows?
Please try this patch and let me know if it does what you want.
Paul.
diff --git a/gitk b/gitk
index d7de27e..54f3f2b 100755
--- a/gitk
+++ b/gitk
@@ -2487,6 +2487,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]
Previous: Steve WagnerNext: Steve Wagner
Message 2 of 8 in “.gitk should created hidden in windows”
  1. Steve WagnerMar 17, 2009
  2. Paul MackerrasMar 23, 2009
  3. Steve WagnerMar 23, 2009
  4. Pat ThoytsMar 24, 2009
  5. Johannes SchindelinMar 24, 2009
  6. Paul MackerrasApr 17, 2009
  7. John TapsellMar 24, 2009
  8. Johannes SchindelinMar 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.