@matheusbsbs / matheus-bagliano / commits / 48750d6a84
Fork 0

[PATCH] gitk: properly deal with tag names containing / (slash)

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 <pape@smarden.org> Signed-off-by: Paul Mackerras <paulus@samba.org>

Gerrit Pape committed Feb 11, 2008 at 10:57 UTC 48750d6a84a7fc08dcd7cb4533c280c00106f9b6
1 file changed +1 -5
gitk
+1 -5
@@ -6149,11 +6149,7 @@ proc domktag {} {
6149 return
6150 }
6151 if {[catch {
6152 - set dir [gitdir]
6153 - set fname [file join $dir "refs/tags" $tag]
6154 - set f [open $fname w]
6155 - puts $f $id
6156 - close $f
6152 + exec git tag $tag $id
6153 } err]} {
6154 error_popup "[mc "Error creating tag:"] $err"
6155 return