git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] difftool/mergetool: make the form of yes/no questions consistent

From
Nikola Forró <nforro@redhat.com>
Date
Apr 12, 2016, 12:59 UTC
Message-ID
<1460465982.3214.7.camel@redhat.com>

Every yes/no question in difftool/mergetool scripts has slightly different form, and none of them is consistent with the form git itself uses.

Make the form of all the questions consistent with the form used by git, i.e. "Question [y/n]? ".

Signed-off-by: Nikola Forró <nforro@redhat.com>
---
 git-difftool--helper.sh | 4 ++--
 git-mergetool--lib.sh   | 2 +-
 git-mergetool.sh        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 2b11b1d..84d6cc0 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -44,10 +44,10 @@ launch_merge_tool () {
 			"$GIT_DIFF_PATH_TOTAL" "$MERGED"
 		if use_ext_cmd
 		then
-			printf "Launch '%s' [Y/n]: " \
+			printf "Launch '%s' [Y/n]? " \
 				"$GIT_DIFFTOOL_EXTCMD"
 		else
-			printf "Launch '%s' [Y/n]: " "$merge_tool"
+			printf "Launch '%s' [Y/n]? " "$merge_tool"
 		fi
 		read ans || return
 		if test "$ans" = n
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 54ac8e4..92adcc0 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -100,7 +100,7 @@ check_unchanged () {
 		while true
 		do
 			echo "$MERGED seems unchanged."
-			printf "Was the merge successful? [y/n] "
+			printf "Was the merge successful [y/n]? "
 			read answer || return 1
 			case "$answer" in
 			y*|Y*) return 0 ;;
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 9f77e3a..2e0635a 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -396,7 +396,7 @@ done
 prompt_after_failed_merge () {
 	while true
 	do
-		printf "Continue merging other unresolved paths (y/n) ? "
+		printf "Continue merging other unresolved paths [y/n]? "
 		read ans || return 1
 		case "$ans" in
 		[yY]*)
-- 
2.4.11
Next: John Keeping
Message 1 of 6 in “difftool/mergetool: make the form of yes/no questions consistent”
  1. difftool/mergetool: make the form of yes/no questions consistentNikola Forró, Apr 12, 2016
  2. John KeepingApr 12, 2016
  3. Nikola ForróApr 12, 2016
  4. John KeepingApr 12, 2016
  5. David AguilarApr 12, 2016
  6. Junio C HamanoApr 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.