Skip to content

Commit

Permalink
[PATCH] gitk: properly deal with tag names containing / (slash)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerrit Pape authored and Paul Mackerras committed Feb 11, 2008
1 parent b9b8600 commit 48750d6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48750d6

Please sign in to comment.