threads / patch / 52727

patchsubmodule foreach: replace $path with $sm_path in example

Subject: [PATCH] submodule foreach: replace $path with $sm_path in example

## tl;dr

2 messages between Jan 31, 2020 and Jan 31, 2020. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Kyle Meyer· Jan 31, 2020, 17:08 UTC · lore

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.

Signed-off-by: Kyle Meyer <kyle@kyleam.com>
---
 Documentation/git-submodule.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-submodule.txt +1 −1
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 5232407f68..218942acd1 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -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>...]::
-- 
2.25.0
Junio C Hamano· Jan 31, 2020, 20:57 UTC · re: Kyle Meyer · lore

Re: [PATCH] submodule foreach: replace $path with $sm_path in example

Kyle Meyer <kyle@kyleam.com> writes:
Show 6 quoted lines
> 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.
>
> Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Makes sense.  Thanks for a careful reading.  Will apply.
Show 17 quoted lines
> ---
>  Documentation/git-submodule.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 5232407f68..218942acd1 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -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>...]::

← back to recent threads