Skip to contentSkip to conversation

Allow gitk to continue and show error message in new repos

PATCH New Alex Riesen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow gitk to continue and show error message in new repos

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).

---
 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
gitk +1 -1
index f74ce51..fc7cc8c 100755
@@ -427,7 +427,7 @@ proc readrefs {} {
 	    lappend idotherrefs($id) $name
 	}
     }
-    close $refd
+    catch { close $refd }
     set mainhead {}
     set mainheadid {}
     catch {
Signature · 1 line
1.5.3.rc3.48.g5b618