Denton Liu [off-list ref] writes:
+ if (argc == 3 || (argc == 2 && command == DO_UNSET)) {
if (!is_writing_gitmodules_ok())
die(_("please make sure that the .gitmodules file is in the working tree"));
- return config_set_in_gitmodules_file_gently(argv[1], argv[2]);
+ const char *value = (argc == 3) ? argv[2] : NULL;
This introduces decl-after-stmt. Move it before the "is it OK to
write?" check.
+ return config_set_in_gitmodules_file_gently(argv[1], value);
}