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

[PATCH] Allow gitk to continue and show error message in new repos

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jul 29, 2007, 20:28 UTC
Message-ID
<20070729202840.GA9362@steel.home>

If there is no commit made yet, gitk just dumps a Tcl error on stderr, which sometimes is hard to see. Noticed when gitk was run from Xfce file manager (thunar's custom action).

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index f74ce51..fc7cc8c 100755
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc readrefs {} {
 	    lappend idotherrefs($id) $name
 	}
     }
-    close $refd
+    catch { close $refd }
     set mainhead {}
     set mainheadid {}
     catch {
-- 
1.5.3.rc3.48.g5b618
Message 1 of 1 in “Allow gitk to continue and show error message in new repos”
  1. Allow gitk to continue and show error message in new reposAlex Riesen, Jul 29, 2007

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.