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

[PATCH] submodule: configure submodule.<name>.path on add and init

From
Orgad Shaneh <orgads@gmail.com>
Date
Sep 24, 2012, 19:30 UTC
Message-ID
<1348515040-19986-1-git-send-email-orgads@gmail.com>
In order to read diff options for a submodule, its path must be configured
---
 git-submodule.sh |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/git-submodule.sh b/git-submodule.sh
index 3e2045e..f97bb62 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -359,6 +359,7 @@ Use -f if you really want to add it." >&2
 			esac
 		) || die "$(eval_gettext "Unable to checkout submodule '\$sm_path'")"
 	fi
+	git config submodule."$sm_path".path "$sm_path"
 	git config submodule."$sm_path".url "$realrepo"
 
 	git add $force "$sm_path" ||
@@ -476,6 +477,7 @@ cmd_init()
 				url=$(resolve_relative_url "$url") || exit
 				;;
 			esac
+			git config submodule."$name".path "$name" ||
 			git config submodule."$name".url "$url" ||
 			die "$(eval_gettext "Failed to register url for submodule path '\$sm_path'")"
 
-- 
1.7.10.4
Next: Orgad Shaneh
Message 1 of 5 in “submodule: configure submodule.<name>.path on add and init”
  1. submodule: configure submodule.<name>.path on add and initOrgad Shaneh, Sep 24, 2012
  2. Orgad ShanehSep 24, 2012
  3. Jens LehmannSep 24, 2012
  4. Junio C HamanoSep 24, 2012
  5. Jens LehmannSep 25, 2012

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.