Skip to content

Commit 48750d6

Browse files
g-papepaulusmack
authored andcommitted
[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>
1 parent b9b8600 commit 48750d6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gitk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6149,11 +6149,7 @@ proc domktag {} {
61496149
return
61506150
}
61516151
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
61576153
} err]} {
61586154
error_popup "[mc "Error creating tag:"] $err"
61596155
return

0 commit comments

Comments
 (0)