unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: 58378@debbugs.gnu.org
Subject: bug#58378: [PATCH] Fix misleading prompt in vc-git-create-tag
Date: Sat, 08 Oct 2022 17:38:36 +0530	[thread overview]
Message-ID: <87bkqmbjqz.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-misleading-prompt-in-vc-git-create-tag.patch --]
[-- Type: text/patch, Size: 1111 bytes --]

From 404f1715f155d1ffb9ea65cf17bf4e5aa1b7bbd5 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
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


             reply	other threads:[~2022-10-08 12:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08 12:08 Visuwesh [this message]
2022-10-08 13:14 ` bug#58378: [PATCH] Fix misleading prompt in vc-git-create-tag Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkqmbjqz.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=58378@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).