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

[PATCH v2 5/5] submodule: take advantage of gettextln and eval_gettextln.

From
Jon Seymour <jon.seymour@gmail.com>
Date
Aug 7, 2011, 11:58 UTC
Message-ID
<1312718297-10999-6-git-send-email-jon.seymour@gmail.com>
In-Reply-To
<1312718297-10999-1-git-send-email-jon.seymour@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 git-submodule.sh |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index bc1d3fa..986c5d6 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -223,12 +223,9 @@ cmd_add()
 
 	if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
 	then
-		(
-			eval_gettext "The following path is ignored by one of your .gitignore files:
+		eval_gettextln "The following path is ignored by one of your .gitignore files:
 \$path
-Use -f if you really want to add it." &&
-			echo
-		) >&2
+Use -f if you really want to add it." >&2
 		exit 1
 	fi
 
@@ -237,7 +234,7 @@ Use -f if you really want to add it." &&
 	then
 		if test -d "$path"/.git -o -f "$path"/.git
 		then
-			eval_gettext "Adding existing repo at '\$path' to the index"; echo
+			eval_gettextln "Adding existing repo at '\$path' to the index"
 		else
 			die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
 		fi
@@ -696,10 +693,7 @@ cmd_summary() {
 				;; # removed
 			*)
 				# unexpected type
-				(
-					eval_gettext "unexpected mode \$mod_dst" &&
-					echo
-				) >&2
+				eval_gettextln "unexpected mode \$mod_dst" >&2
 				continue ;;
 			esac
 		fi
@@ -786,9 +780,9 @@ cmd_summary() {
 	done |
 	if test -n "$for_status"; then
 		if [ -n "$files" ]; then
-			gettext "# Submodules changed but not updated:"; echo
+			gettextln "# Submodules changed but not updated:"
 		else
-			gettext "# Submodule changes to be committed:"; echo
+			gettextln "# Submodule changes to be committed:"
 		fi
 		echo "#"
 		sed -e 's|^|# |' -e 's|^# $|#|'
-- 
1.7.6.363.g9b380.dirty
Previous: Jon Seymour
Message 6 of 6 in “gettext: add gettextln, eval_gettextln to encode common idiom”
  1. 0/5 gettext: add gettextln, eval_gettextln to encode common idiomJon Seymour, Aug 7, 2011
  2. 1/5 gettext: add gettextln, eval_gettextln to encode common idiomJon Seymour, Aug 7, 2011
  3. 2/5 git-am: take advantage of gettextln and eval_gettextln.Jon Seymour, Aug 7, 2011
  4. 3/5 pull: take advantage of eval_gettextlnJon Seymour, Aug 7, 2011
  5. 4/5 stash: take advantage of eval_gettextlnJon Seymour, Aug 7, 2011
  6. 5/5 submodule: take advantage of gettextln and eval_gettextln.Jon Seymour, Aug 7, 2011

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.