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

[PATCH v2 2/2] submodule::module_clone(): silence die() message from module_name()

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Oct 21, 2011, 13:49 UTC
Message-ID
<1319204976-5076-3-git-send-email-rctay89@gmail.com>
In-Reply-To
<1319204976-5076-2-git-send-email-rctay89@gmail.com>

The die() message that may occur in module_name() is not really relevant to the user when called from module_clone(); the latter handles the "failure" (no submodule mapping) anyway.

Analysis of other callsites is left to future work.
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 8e9e5ea..5d29f82 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -124,7 +124,7 @@ module_clone()
 	reference="$3"
 	gitdir=
 	gitdir_base=
-	name=$(module_name "$path")
+	name=$(module_name "$path" 2>/dev/null)
 	base_path=$(dirname "$path")
 
 	gitdir=$(git rev-parse --git-dir)
-- 
1.7.6.msysgit.0.584.g2cbf
Previous: Tay Ray ChuanNext: Jens Lehmann
Message 8 of 9 in “submodule: whitespace fix”
  1. 1/2 submodule: whitespace fixTay Ray Chuan, Oct 7, 2011
  2. 2/2 submodule::module_clone(): silence die() message from module_name()Tay Ray Chuan, Oct 7, 2011
  3. Jens LehmannOct 10, 2011
  4. Tay Ray ChuanOct 11, 2011
  5. Jens LehmannOct 11, 2011
  6. 0/2 submodule patchesTay Ray Chuan, Oct 21, 2011
  7. 1/2 submodule: whitespace fixTay Ray Chuan, Oct 21, 2011
  8. 2/2 submodule::module_clone(): silence die() message from module_name()Tay Ray Chuan, Oct 21, 2011
  9. Jens LehmannOct 10, 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.