From 48750d6a84a7fc08dcd7cb4533c280c00106f9b6 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Mon, 11 Feb 2008 10:57:40 +0000 Subject: [PATCH] [PATCH] gitk: properly deal with tag names containing / (slash) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When creating a tag through gitk, and the tag name includes a slash (or slashes), gitk errors out in a popup window. This patch makes gitk use 'git tag' to create the tag instead of modifying files in refs/tags/, which fixes the issue; if 'git tag' throws an error, gitk pops up with the error message. The problem was reported by Frédéric Brière through http://bugs.debian.org/464104 Signed-off-by: Gerrit Pape Signed-off-by: Paul Mackerras --- gitk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gitk b/gitk index dab9df067..80544bfc5 100755 --- a/gitk +++ b/gitk @@ -6149,11 +6149,7 @@ proc domktag {} { return } if {[catch { - set dir [gitdir] - set fname [file join $dir "refs/tags" $tag] - set f [open $fname w] - puts $f $id - close $f + exec git tag $tag $id } err]} { error_popup "[mc "Error creating tag:"] $err" return -- 2.26.2