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

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

 



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�ric Bri� through
 http://bugs.debian.org/464104

Signed-off-by: Gerrit Pape <pape@xxxxxxxxxxx>
---
 gitk-git/gitk |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 5560e4d..00d791f 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -6137,11 +6137,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
-- 
1.5.4

-
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