Skip to content

Commit bad51c5

Browse files
committed
config: correct documentation for non-existent config file
1 parent ac1c157 commit bad51c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/git2/config.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ GIT_EXTERN(int) git_config_new(git_config **out);
171171
* parsed; it's expected to be a native Git config file following
172172
* the default Git config syntax (see man git-config).
173173
*
174+
* If the file does not exist, the file will still be added and it
175+
* will be created the first time we write to it.
176+
*
174177
* Note that the configuration object will free the file
175178
* automatically.
176179
*
@@ -202,8 +205,7 @@ GIT_EXTERN(int) git_config_add_file_ondisk(
202205
*
203206
* @param out The configuration instance to create
204207
* @param path Path to the on-disk file to open
205-
* @return 0 on success, GIT_ENOTFOUND when the file doesn't exist
206-
* or an error code
208+
* @return 0 on success, or an error code
207209
*/
208210
GIT_EXTERN(int) git_config_open_ondisk(git_config **out, const char *path);
209211

0 commit comments

Comments
 (0)