submodule foreach: document variable '$displaypath'

It was observed that the variable '$displaypath' was accessible but
undocumented. Hence, document it.

Discussed-with: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Prathamesh Chavan <pc44800@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Prathamesh Chavan
2018-05-08 17:29:51 -07:00
committed by Junio C Hamano
parent f0fd0dc5c5
commit b6f7ac8fd5
2 changed files with 16 additions and 14 deletions

View File

@ -183,11 +183,13 @@ information too.
foreach [--recursive] <command>::
Evaluates an arbitrary shell command in each checked out submodule.
The command has access to the variables $name, $sm_path, $sha1 and
$toplevel:
The command has access to the variables $name, $sm_path, $displaypath,
$sha1 and $toplevel:
$name is the name of the relevant submodule section in `.gitmodules`,
$sm_path is the path of the submodule as recorded in the immediate
superproject, $sha1 is the commit as recorded in the immediate
superproject, $displaypath contains the relative path from the
current working directory to the submodules root directory,
$sha1 is the commit as recorded in the immediate
superproject, and $toplevel is the absolute path to the top-level
of the immediate superproject.
Note that to avoid conflicts with '$PATH' on Windows, the '$path'