I'm reading through the config.c code and it looks like the git_config_set_* functions all attempt to set the value on the highest-level backend, and if that fails it returns an error. I'm inclined to say this function should explicitly skip any backends that are marked as readonly. This way the app can add an application-level backend that doesn't support writes, mark it as readonly, and the git_config_set_* functions will behave as though the app-level backend wasn't added instead of throwing an error.