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

[PATCH v4 4/6] submodule: show full path in error message

From
John Keeping <john@keeping.me.uk>
Date
Jun 16, 2013, 14:18 UTC
Message-ID
<eec9274fcda272904c625fe3d8e68b34490671cf.1371391740.git.john@keeping.me.uk>
In-Reply-To
<cover.1371391740.git.john@keeping.me.uk>

When --recursive was added to "submodule foreach" in commit 15fc56a (git submodule foreach: Add --recursive to recurse into nested submodules, 2009-08-19), the error message when the script returns a non-zero status was not updated to contain $prefix to show the full path. Fix this.

Signed-off-by: John Keeping <john@keeping.me.uk>
---
 git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 79bfaac..bdb438b 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -485,7 +485,7 @@ cmd_foreach()
 					cmd_foreach "--recursive" "$@"
 				fi
 			) <&3 3<&- ||
-			die "$(eval_gettext "Stopping at '\$sm_path'; script returned non-zero status.")"
+			die "$(eval_gettext "Stopping at '\$prefix\$sm_path'; script returned non-zero status.")"
 		fi
 	done
 }
-- 
1.8.3.779.g691e267
Previous: John KeepingNext: John Keeping
Message 5 of 8 in “submodule: drop the top-level requirement”
  1. 0/6 submodule: drop the top-level requirementJohn Keeping, Jun 16, 2013
  2. 1/6 t7401: make indentation consistentJohn Keeping, Jun 16, 2013
  3. 2/6 t7403: modernize styleJohn Keeping, Jun 16, 2013
  4. 3/6 t7403: add missing && chainingJohn Keeping, Jun 16, 2013
  5. 4/6 submodule: show full path in error messageJohn Keeping, Jun 16, 2013
  6. 5/6 rev-parse: add --prefix optionJohn Keeping, Jun 16, 2013
  7. 6/6 submodule: drop the top-level requirementJohn Keeping, Jun 16, 2013
  8. Jens LehmannJun 17, 2013

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.