OSDN Git Service

[PATCH] gitk: Continue and show error message in new repos
authorAlex Riesen <raa.lkml@gmail.com>
Sun, 29 Jul 2007 20:28:40 +0000 (22:28 +0200)
committerPaul Mackerras <paulus@samba.org>
Sun, 12 Aug 2007 07:30:57 +0000 (17:30 +1000)
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk

diff --git a/gitk b/gitk
index 9000383..b0a76dd 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -427,7 +427,7 @@ proc readrefs {} {
            lappend idotherrefs($id) $name
        }
     }
-    close $refd
+    catch {close $refd}
     set mainhead {}
     set mainheadid {}
     catch {