summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorLibravatar Dave Dulson <dave@dulson.com>2010-01-03 14:55:52 +0000
committerLibravatar Paul Mackerras <paulus@samba.org>2010-01-12 22:04:46 +1100
commitdfb891e35100cf78873c5cf81ffe778dbe235ef5 (patch)
tree626d47c1d4b2c6939998c0b5e885e82a91e91eb2 /gitk
parentgitk: Update Hungarian translation (diff)
downloadtgif-dfb891e35100cf78873c5cf81ffe778dbe235ef5.tar.xz
gitk: Enable gitk to create tags with messages
Currently, tags created using the "create tag" dialog in gitk are always lightweight tags, i.e., they don't have any annotation (message). This enables the user to specify a message; if they do, gitk will create an unsigned, annotated tag object. Signed-off-by: David Dulson <dave@dulson.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk12
1 files changed, 11 insertions, 1 deletions
diff --git a/gitk b/gitk
index 86dff0fc06..0b3e5bca73 100755
--- a/gitk
+++ b/gitk
@@ -8701,6 +8701,11 @@ proc mktag {} {
${NS}::label $top.tlab -text [mc "Tag name:"]
${NS}::entry $top.tag -width 60
grid $top.tlab $top.tag -sticky w
+ ${NS}::label $top.op -text [mc "Tag message is optional"]
+ grid $top.op -columnspan 2 -sticky we
+ ${NS}::label $top.mlab -text [mc "Tag message:"]
+ ${NS}::entry $top.msg -width 60
+ grid $top.mlab $top.msg -sticky w
${NS}::frame $top.buts
${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo
${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan
@@ -8718,6 +8723,7 @@ proc domktag {} {
set id [$mktagtop.sha1 get]
set tag [$mktagtop.tag get]
+ set msg [$mktagtop.msg get]
if {$tag == {}} {
error_popup [mc "No tag name specified"] $mktagtop
return 0
@@ -8727,7 +8733,11 @@ proc domktag {} {
return 0
}
if {[catch {
- exec git tag $tag $id
+ if {$msg != {}} {
+ exec git tag -a -m $msg $tag $id
+ } else {
+ exec git tag $tag $id
+ }
} err]} {
error_popup "[mc "Error creating tag:"] $err" $mktagtop
return 0