config.c: add repo_config_set_worktree_gently()
This is C equivalent of "git config --set --worktree". In other words, it will - write to $GIT_DIR/config in single-worktree setup - write to $GIT_COMMON_DIR/worktrees/<x>/config.worktree or $GIT_COMMON_DIR/config.worktree (for main worktree) if extensions.worktreeConfig is enabled - return error in multiple-worktree setup if extensions.worktreeConfig is not enabled. While at there, also add repo_config_set*() for writing to $GIT_COMMON_DIR/config. Note, since git_config_set_multivar_in_file_gently() only invalidates the config set of the_repository, anybody who uses these functions on submodules must do additional invalidation if needed.
Showing with 43 additions and 1 deletion