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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux