Subject: bug#58378: [PATCH] Fix misleading prompt in vc-git-create-tag

From: Visuwesh <[email-masked]>
Date: Sat, 08 Oct 2022 17:38:36 +0530

Tags: patch

The prompt shows a default value but it is not actually passed to
vc-read-revision.  Attached patch fixes that.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, Motif Version 2.3.8,
 cairo version 1.16.0) of 2022-10-06 built on astatine
Repository revision: e1d63eda4be2e2de8f1610fb76a1e0eec67a6c42
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --with-x-toolkit=motif'

>From 404f1715f155d1ffb9ea65cf17bf4e5aa1b7bbd5 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Sat, 8 Oct 2022 17:37:16 +0530
Subject: [PATCH] Fix misleading prompt in vc-git-create-tag

* lisp/vc/vc-git.el (vc-git-create-tag): Actually pass the DEFAULT
argument to vc-read-revision.
---
 lisp/vc/vc-git.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f9dae8b9ea..ea06ccaf87 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1635,7 +1635,7 @@ vc-git-create-tag
         (start-point (when branchp (vc-read-revision
                                     (format-prompt "Start point"
                                                    (car (vc-git-branches)))
-                                    (list dir) 'Git))))
+                                    (list dir) 'Git (car (vc-git-branches))))))
     (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh"))
              (y-or-n-p "Modified files exist.  Proceed? ")
              (user-error (format "Can't create %s with modified files"
-- 
2.37.2