Skip to content

Commit d7be1f1

Browse files
peffgitster
authored andcommitted
docs/api-config: minor clarifications
The first change simply drops some parentheses to make a statement more clear. The seconds clarifies that almost nobody wants to call git_config_early. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9c3c22e commit d7be1f1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Documentation/technical/api-config.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ General Usage
1111
Config files are parsed linearly, and each variable found is passed to a
1212
caller-provided callback function. The callback function is responsible
1313
for any actions to be taken on the config option, and is free to ignore
14-
some options (it is not uncommon for the configuration to be parsed
14+
some options. It is not uncommon for the configuration to be parsed
1515
several times during the run of a git program, with different callbacks
16-
picking out different variables useful to themselves).
16+
picking out different variables useful to themselves.
1717

1818
A config callback function takes three parameters:
1919

@@ -47,11 +47,12 @@ will first feed the user-wide one to the callback, and then the
4747
repo-specific one; by overwriting, the higher-priority repo-specific
4848
value is left at the end).
4949

50-
There is a special version of `git_config` called `git_config_early`
51-
that takes an additional parameter to specify the repository config.
52-
This should be used early in a git program when the repository location
53-
has not yet been determined (and calling the usual lazy-evaluation
54-
lookup rules would yield an incorrect location).
50+
There is a special version of `git_config` called `git_config_early`.
51+
This version takes an additional parameter to specify the repository
52+
config, instead of having it looked up via `git_path`. This is useful
53+
early in a git program before the repository has been found. Unless
54+
you're working with early setup code, you probably don't want to use
55+
this.
5556

5657
Reading Specific Files
5758
----------------------

0 commit comments

Comments
 (0)