mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'jc/optional-path'
"git config get --path" segfaulted on an ":(optional)path" that does not exist, which has been corrected. * jc/optional-path: config: really treat missing optional path as not configured config: really pretend missing :(optional) value is not there config: mark otherwise unused function as file-scope static
This commit is contained in:
@@ -794,8 +794,16 @@ static int git_gpg_config(const char *var, const char *value,
|
||||
fmtname = "ssh";
|
||||
|
||||
if (fmtname) {
|
||||
char *program;
|
||||
int status;
|
||||
|
||||
fmt = get_format_by_name(fmtname);
|
||||
return git_config_pathname((char **) &fmt->program, var, value);
|
||||
status = git_config_pathname(&program, var, value);
|
||||
if (status)
|
||||
return status;
|
||||
if (program)
|
||||
fmt->program = program;
|
||||
return status;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user