git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow gitk to continue and show error message in new repos
@ 2007-07-29 20:28 Alex Riesen
  0 siblings, 0 replies; only message in thread
From: Alex Riesen @ 2007-07-29 20:28 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-29 20:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 20:28 [PATCH] Allow gitk to continue and show error message in new repos Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).