]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: factor out a config_set_in_gitmodules_file_gently function
authorAntonio Ospite <ao2@ao2.it>
Fri, 5 Oct 2018 13:05:53 +0000 (15:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Oct 2018 03:40:20 +0000 (12:40 +0900)
commit45f5ef3d77ec3d2465641cd219b2f3874fa72083
tree96b51be4e78d111c2322387a67186bd57362e44e
parentbcbc780d143c4e8a9c6449f38b8c83d62da14906
submodule: factor out a config_set_in_gitmodules_file_gently function

Introduce a new config_set_in_gitmodules_file_gently() function to write
config values to the .gitmodules file.

This is in preparation for a future change which will use the function
to write to the .gitmodules file in a more controlled way instead of
using "git config -f .gitmodules".

The purpose of the change is mainly to centralize the code that writes
to the .gitmodules file to avoid some duplication.

The naming follows git_config_set_in_file_gently() but the git_ prefix
is removed to communicate that this is not a generic git-config API.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule-config.c
submodule-config.h
submodule.c