Merge branch 'js/config-set-in-non-repository'
"git config section.var value" to set a value in per-repository configuration file failed when it was run outside any repository, but didn't say the reason correctly. * js/config-set-in-non-repository: git config: report when trying to modify a non-existing repo config
This commit is contained in:
@ -377,6 +377,9 @@ static int get_colorbool(const char *var, int print)
|
||||
|
||||
static void check_write(void)
|
||||
{
|
||||
if (!given_config_source.file && !startup_info->have_repository)
|
||||
die("not in a git directory");
|
||||
|
||||
if (given_config_source.use_stdin)
|
||||
die("writing to stdin is not supported");
|
||||
|
||||
|
Reference in New Issue
Block a user