Commit 9cd0c6f1 by Carlos Martín Nieto

config: return an error if config_refresh is called on a snapshot

Instead of treating it as a no-op, treat it as a programming error and return
the same kind of error as if you called to set or delete variables on a
snapshot.
parent 2424e64c
......@@ -327,7 +327,7 @@ static int config_refresh(git_config_backend *cfg)
uint32_t i;
if (b->header.parent.readonly)
return 0;
return config_error_readonly();
error = config_is_modified(&modified, &b->file);
if (error < 0 && error != GIT_ENOTFOUND)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment