Skip to contentSkip to conversation

submodule foreach: replace $path with $sm_path in example

PATCH In review Kyle Meyer 2 participants 2 messages Jan 31, 2020 Documentation

lore
Share & tools
lore

Kyle Meyer

author
#0 lore raw

PATCH 1/1 submodule foreach: replace $path with $sm_path in example

f0fd0dc5c5 (submodule foreach: document '$sm_path' instead of '$path', 2018-05-08) updated the documentation to advise callers to favor $sm_path over the deprecated synonym $path. However, the example in that section still uses $path. Update it to use $sm_path.

---
 Documentation/git-submodule.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-submodule.txt +1 -1
index 5232407f68..218942acd1 100644
@@ -229,7 +229,7 @@ As an example, the command below will show the path and currently
 checked out commit for each submodule:
 +
 --------------
-git submodule foreach 'echo $path `git rev-parse HEAD`'
+git submodule foreach 'echo $sm_path `git rev-parse HEAD`'
 --------------
 
 sync [--recursive] [--] [<path>...]::
Signature · 1 line
2.25.0
#1 lore raw
Quoted 6 lines · Kyle Meyer

f0fd0dc5c5 (submodule foreach: document '$sm_path' instead of '$path', 2018-05-08) updated the documentation to advise callers to favor $sm_path over the deprecated synonym $path. However, the example in that section still uses $path. Update it to use $sm_path.

Makes sense. Thanks for a careful reading. Will apply.

Quoted 17 lines
---
 Documentation/git-submodule.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-submodule.txt +1 -1
index 5232407f68..218942acd1 100644
@@ -229,7 +229,7 @@ As an example, the command below will show the path and currently
 checked out commit for each submodule:
 +
 --------------
-git submodule foreach 'echo $path `git rev-parse HEAD`'
+git submodule foreach 'echo $sm_path `git rev-parse HEAD`'
 --------------
 
 sync [--recursive] [--] [<path>...]::