Skip to content

Commit f2627d9

Browse files
stefanbellergitster
authored andcommitted
submodule-config: clarify parsing of null_sha1 element
Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Reviewed-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73c293b commit f2627d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Documentation/technical/api-submodule-config.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ Functions
5656

5757
The same as above but lookup by name.
5858

59-
If given the null_sha1 as treeish_name the local configuration of a
60-
submodule will be returned (e.g. consolidated values from local git
59+
Whenever a submodule configuration is parsed in `parse_submodule_config_option`
60+
via e.g. `gitmodules_config()`, it will overwrite the null_sha1 entry.
61+
So in the normal case, when HEAD:.gitmodules is parsed first and then overlayed
62+
with the repository configuration, the null_sha1 entry contains the local
63+
configuration of a submodule (e.g. consolidated values from local git
6164
configuration and the .gitmodules file in the worktree).
6265

6366
For an example usage see test-submodule-config.c.

0 commit comments

Comments
 (0)