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

[PATCH] git-submodule fixes for call to git config --get-regexp

From
Chris Larson <clarson@kergoth.com>
Date
Jul 20, 2007, 17:23 UTC
Message-ID
<b6ebd0a50707201023h12ed3c61v31ccb2b356c1ee42@mail.gmail.com>
Two minor git-submodule fixes:
* Escape !'s in the git config --get-regexp, so submodule paths can
contain them.
* Be more explicit about the value regex, otherwise things get confused if one
  submodule name is a prefix of another (since --get-regexp can return
  multiple values).
Signed-off-by: Chris Larson <clarson@kergoth.com>

--- git-submodule.sh.old 2007-07-20 10:13:22.578125000 -0700 +++ git-submodule.sh 2007-07-20 10:14:56.281250000 -0700

@@ -46,7 +46,8 @@ get_repo_base() {
 #
 module_name()
 {
-       name=$(GIT_CONFIG=.gitmodules git config --get-regexp
'^submodule\..*\.path$' "$1" |
+       path=$(echo "$1" | sed -e 's/\!/\\!/g')
+       name=$(GIT_CONFIG=.gitmodules git config --get-regexp
'^submodule\..*\.path$' "^$path$" |
        sed -nre 's/^submodule\.(.+)\.path .+$/\1/p')
        test -z "$name" &&
        die "No submodule mapping found in .gitmodules for path '$path'"
-- 
Chris Larson - clarson at kergoth dot com
Dedicated Engineer - MontaVista - clarson at mvista dot com
Core Developer/Architect - TSLib, BitBake, OpenEmbedded, OpenZaurus
Next: Junio C Hamano
Message 1 of 3 in “git-submodule fixes for call to git config --get-regexp”
  1. git-submodule fixes for call to git config --get-regexpChris Larson, Jul 20, 2007
  2. Junio C HamanoJul 20, 2007
  3. Johannes SchindelinJul 20, 2007

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.