633
{
634
int nongit = !startup_info->have_repository;
635
char *value;
636
+ int flags = 0;
637
638
given_config_source.file = xstrdup_or_null(getenv(CONFIG_ENVIRONMENT));
639
801
error(_("--fixed-value only applies with 'value-pattern'"));
802
usage_builtin_config();
803
}
804
+
805
+ flags |= CONFIG_FLAGS_FIXED_VALUE;
806
}
807
808
if (actions & PAGING_ACTIONS)
866
value = normalize_value(argv[0], argv[1]);
867
UNLEAK(value);
868
return git_config_set_multivar_in_file_gently(given_config_source.file,
866
- argv[0], value, argv[2], 0);
869
+ argv[0], value, argv[2],
870
+ flags);
871
}
872
else if (actions == ACTION_ADD) {
873
check_write();
876
UNLEAK(value);
877
return git_config_set_multivar_in_file_gently(given_config_source.file,
878
argv[0], value,
875
- CONFIG_REGEX_NONE, 0);
879
+ CONFIG_REGEX_NONE,
880
+ flags);
881
}
882
else if (actions == ACTION_REPLACE_ALL) {
883
check_write();
886
UNLEAK(value);
887
return git_config_set_multivar_in_file_gently(given_config_source.file,
888
argv[0], value, argv[2],
884
- CONFIG_FLAGS_MULTI_REPLACE);
889
+ flags | CONFIG_FLAGS_MULTI_REPLACE);
890
}
891
else if (actions == ACTION_GET) {
892
check_argc(argc, 1, 2);
913
check_argc(argc, 1, 2);
914
if (argc == 2)
915
return git_config_set_multivar_in_file_gently(given_config_source.file,
911
- argv[0], NULL, argv[1], 0);
916
+ argv[0], NULL, argv[1],
917
+ flags);
918
else
919
return git_config_set_in_file_gently(given_config_source.file,
920
argv[0], NULL);
924
check_argc(argc, 1, 2);
925
return git_config_set_multivar_in_file_gently(given_config_source.file,
926
argv[0], NULL, argv[1],
921
- CONFIG_FLAGS_MULTI_REPLACE);
927
+ flags | CONFIG_FLAGS_MULTI_REPLACE);
928
}
929
else if (actions == ACTION_RENAME_SECTION) {
930
int ret;