From dc9c1178fde4a870a3e558ab933dabb1d9621bdf Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Wed, 19 May 2010 23:22:03 +0100 Subject: [PATCH] `magit-tag' now knows about revisions. --- magit.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/magit.el b/magit.el index bd78bb6a..e64a784c 100644 --- a/magit.el +++ b/magit.el @@ -3266,12 +3266,14 @@ Prefix arg means justify as well." ;;; Tags -(defun magit-tag (name) - "Creates a new lightweight tag with the given NAME. -Tag will point to the current 'HEAD'. +(defun magit-tag (name rev) + "Creates a new lightweight tag with the given NAME at REV. \('git tag NAME')." - (interactive "sNew tag name: ") - (magit-run-git "tag" name)) + (interactive + (list + (read-string "Tag name: ") + (magit-read-rev "Place tag on: " (or (magit-default-rev) "HEAD")))) + (magit-run-git "tag" name rev)) (defun magit-annotated-tag (name) "Start composing an annotated tag with the given NAME.