config: hide functions using `the_repository` by default
The config subsystem provides a bunch of legacy functions that read or set configuration for `the_repository`. The use of those functions is discouraged, and it is easy to miss the implicit dependency on `the_repository` that calls to those functions may cause. Move all config-related functions that use `the_repository` into a block that gets only conditionally compiled depending on whether or not the macro has been defined. This also removes all dependencies on that variable in "config.c", allowing us to remove the definition of said preprocessor macro. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Aug 13, 2024 at 11:14 UTC
036876a106739504c9a45d17f620cc34acd2f874
2 files changed
+171
-208
config.c
-130
@@ -6,8 +6,6 @@
6
*
7
*/
8
9
-#define USE_THE_REPOSITORY_VARIABLE
10
-
9
#include "git-compat-util.h"
10
#include "abspath.h"
11
#include "advice.h"
@@ -2695,78 +2693,6 @@ void git_protected_config(config_fn_t fn, void *data)
2693
configset_iter(&protected_config, fn, data);
2694
}
2695
2698
-/* Functions used historically to read configuration from 'the_repository' */
2699
-void git_config(config_fn_t fn, void *data)
2700
-{
2701
- repo_config(the_repository, fn, data);
2702
-}
2703
-
2704
-void git_config_clear(void)
2705
-{
2706
- repo_config_clear(the_repository);
2707
-}
2708
-
2709
-int git_config_get(const char *key)
2710
-{
2711
- return repo_config_get(the_repository, key);
2712
-}
2713
-
2714
-int git_config_get_value(const char *key, const char **value)
2715
-{
2716
- return repo_config_get_value(the_repository, key, value);
2717
-}
2718
-
2719
-int git_config_get_value_multi(const char *key, const struct string_list **dest)
2720
-{
2721
- return repo_config_get_value_multi(the_repository, key, dest);
2722
-}
2723
-
2724
-int git_config_get_string_multi(const char *key,
2725
- const struct string_list **dest)
2726
-{
2727
- return repo_config_get_string_multi(the_repository, key, dest);
2728
-}
2729
-
2730
-int git_config_get_string(const char *key, char **dest)
2731
-{
2732
- return repo_config_get_string(the_repository, key, dest);
2733
-}
2734
-
2735
-int git_config_get_string_tmp(const char *key, const char **dest)
2736
-{
2737
- return repo_config_get_string_tmp(the_repository, key, dest);
2738
-}
2739
-
2740
-int git_config_get_int(const char *key, int *dest)
2741
-{
2742
- return repo_config_get_int(the_repository, key, dest);
2743
-}
2744
-
2745
-int git_config_get_ulong(const char *key, unsigned long *dest)
2746
-{
2747
- return repo_config_get_ulong(the_repository, key, dest);
2748
-}
2749
-
2750
-int git_config_get_bool(const char *key, int *dest)
2751
-{
2752
- return repo_config_get_bool(the_repository, key, dest);
2753
-}
2754
-
2755
-int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest)
2756
-{
2757
- return repo_config_get_bool_or_int(the_repository, key, is_bool, dest);
2758
-}
2759
-
2760
-int git_config_get_maybe_bool(const char *key, int *dest)
2761
-{
2762
- return repo_config_get_maybe_bool(the_repository, key, dest);
2763
-}
2764
-
2765
-int git_config_get_pathname(const char *key, char **dest)
2766
-{
2767
- return repo_config_get_pathname(the_repository, key, dest);
2768
-}
2769
-
2696
int repo_config_get_expiry(struct repository *r, const char *key, const char **output)
2697
{
2698
int ret = repo_config_get_string(r, key, (char **)output);
@@ -3186,35 +3112,17 @@ int repo_config_set_in_file_gently(struct repository *r, const char *config_file
3112
return repo_config_set_multivar_in_file_gently(r, config_filename, key, value, NULL, comment, 0);
3113
}
3114
3189
-int git_config_set_in_file_gently(const char *config_filename,
3190
- const char *key, const char *comment, const char *value)
3191
-{
3192
- return repo_config_set_in_file_gently(the_repository, config_filename,
3193
- key, comment, value);
3194
-}
3195
-
3115
void repo_config_set_in_file(struct repository *r, const char *config_filename,
3116
const char *key, const char *value)
3117
{
3118
repo_config_set_multivar_in_file(r, config_filename, key, value, NULL, 0);
3119
}
3120
3202
-void git_config_set_in_file(const char *config_filename,
3203
- const char *key, const char *value)
3204
-{
3205
- repo_config_set_in_file(the_repository, config_filename, key, value);
3206
-}
3207
-
3121
int repo_config_set_gently(struct repository *r, const char *key, const char *value)
3122
{
3123
return repo_config_set_multivar_gently(r, key, value, NULL, 0);
3124
}
3125
3213
-int git_config_set_gently(const char *key, const char *value)
3214
-{
3215
- return repo_config_set_gently(the_repository, key, value);
3216
-}
3217
-
3126
int repo_config_set_worktree_gently(struct repository *r,
3127
const char *key, const char *value)
3128
{
@@ -3236,11 +3144,6 @@ void repo_config_set(struct repository *r, const char *key, const char *value)
3144
trace2_cmd_set_config(key, value);
3145
}
3146
3239
-void git_config_set(const char *key, const char *value)
3240
-{
3241
- repo_config_set(the_repository, key, value);
3242
-}
3243
-
3147
char *git_config_prepare_comment_string(const char *comment)
3148
{
3149
size_t leading_blanks;
@@ -3569,17 +3472,6 @@ write_err_out:
3472
goto out_free;
3473
}
3474
3572
-int git_config_set_multivar_in_file_gently(const char *config_filename,
3573
- const char *key, const char *value,
3574
- const char *value_pattern,
3575
- const char *comment,
3576
- unsigned flags)
3577
-{
3578
- return repo_config_set_multivar_in_file_gently(the_repository, config_filename,
3579
- key, value, value_pattern,
3580
- comment, flags);
3581
-}
3582
-
3475
void repo_config_set_multivar_in_file(struct repository *r,
3476
const char *config_filename,
3477
const char *key, const char *value,
@@ -3594,21 +3486,6 @@ void repo_config_set_multivar_in_file(struct repository *r,
3486
die(_("could not unset '%s'"), key);
3487
}
3488
3597
-void git_config_set_multivar_in_file(const char *config_filename,
3598
- const char *key, const char *value,
3599
- const char *value_pattern, unsigned flags)
3600
-{
3601
- repo_config_set_multivar_in_file(the_repository, config_filename,
3602
- key, value, value_pattern, flags);
3603
-}
3604
-
3605
-int git_config_set_multivar_gently(const char *key, const char *value,
3606
- const char *value_pattern, unsigned flags)
3607
-{
3608
- return repo_config_set_multivar_gently(the_repository, key, value,
3609
- value_pattern, flags);
3610
-}
3611
-
3489
int repo_config_set_multivar_gently(struct repository *r, const char *key,
3490
const char *value,
3491
const char *value_pattern, unsigned flags)
@@ -3632,13 +3509,6 @@ void repo_config_set_multivar(struct repository *r,
3509
free(file);
3510
}
3511
3635
-void git_config_set_multivar(const char *key, const char *value,
3636
- const char *value_pattern, unsigned flags)
3637
-{
3638
- repo_config_set_multivar(the_repository, key, value,
3639
- value_pattern, flags);
3640
-}
3641
-
3512
static size_t section_name_match (const char *buf, const char *name)
3513
{
3514
size_t i = 0, j = 0;
config.h
+171
-78
@@ -26,7 +26,7 @@ struct object_id;
26
/* git_config_parse_key() returns these negated: */
27
#define CONFIG_INVALID_KEY 1
28
#define CONFIG_NO_SECTION_OR_NAME 2
29
-/* git_config_set_gently(), git_config_set_multivar_gently() return the above or these: */
29
+/* repo_config_set_gently(), repo_config_set_multivar_gently() return the above or these: */
30
#define CONFIG_NO_LOCK -1
31
#define CONFIG_INVALID_FILE 3
32
#define CONFIG_NO_WRITE 4
@@ -170,9 +170,9 @@ int git_default_config(const char *, const char *,
170
171
/**
172
* Read a specific file in git-config format.
173
- * This function takes the same callback and data parameters as `git_config`.
173
+ * This function takes the same callback and data parameters as `repo_config`.
174
*
175
- * Unlike git_config(), this function does not respect includes.
175
+ * Unlike repo_config(), this function does not respect includes.
176
*/
177
int git_config_from_file(config_fn_t fn, const char *, void *);
178
@@ -198,9 +198,9 @@ void read_very_early_config(config_fn_t cb, void *data);
198
/**
199
* Most programs will simply want to look up variables in all config files
200
* that Git knows about, using the normal precedence rules. To do this,
201
- * call `git_config` with a callback function and void data pointer.
201
+ * call `repo_config` with a callback function and void data pointer.
202
*
203
- * `git_config` will read all config sources in order of increasing
203
+ * `repo_config` will read all config sources in order of increasing
204
* priority. Thus a callback should typically overwrite previously-seen
205
* entries with new ones (e.g., if both the user-wide `~/.gitconfig` and
206
* repo-specific `.git/config` contain `color.ui`, the config machinery
@@ -210,11 +210,11 @@ void read_very_early_config(config_fn_t cb, void *data);
210
*
211
* Unlike git_config_from_file(), this function respects includes.
212
*/
213
-void git_config(config_fn_t fn, void *);
213
+void repo_config(struct repository *r, config_fn_t fn, void *);
214
215
/**
216
* Lets the caller examine config while adjusting some of the default
217
- * behavior of `git_config`. It should almost never be used by "regular"
217
+ * behavior of `repo_config`. It should almost never be used by "regular"
218
* Git code that is looking up configuration variables.
219
* It is intended for advanced callers like `git-config`, which are
220
* intentionally tweaking the normal config-lookup process.
@@ -223,12 +223,12 @@ void git_config(config_fn_t fn, void *);
223
* - `config_source`
224
* If this parameter is non-NULL, it specifies the source to parse for
225
* configuration, rather than looking in the usual files. See `struct
226
- * git_config_source` in `config.h` for details. Regular `git_config` defaults
226
+ * git_config_source` in `config.h` for details. Regular `repo_config` defaults
227
* to `NULL`.
228
*
229
* - `opts`
230
* Specify options to adjust the behavior of parsing config files. See `struct
231
- * config_options` in `config.h` for details. As an example: regular `git_config`
231
+ * config_options` in `config.h` for details. As an example: regular `repo_config`
232
* sets `opts.respect_includes` to `1` by default.
233
*/
234
int config_with_options(config_fn_t fn, void *,
@@ -297,7 +297,6 @@ int git_config_pathname(char **, const char *, const char *);
297
298
int git_config_expiry_date(timestamp_t *, const char *, const char *);
299
int git_config_color(char *, const char *, const char *);
300
-int git_config_set_in_file_gently(const char *, const char *, const char *, const char *);
300
int repo_config_set_in_file_gently(struct repository *r, const char *config_filename,
301
const char *key, const char *comment, const char *value);
302
@@ -305,10 +304,8 @@ int repo_config_set_in_file_gently(struct repository *r, const char *config_file
304
* write config values to a specific config file, takes a key/value pair as
305
* parameter.
306
*/
308
-void git_config_set_in_file(const char *, const char *, const char *);
307
void repo_config_set_in_file(struct repository *, const char *, const char *, const char *);
308
311
-int git_config_set_gently(const char *, const char *);
309
int repo_config_set_gently(struct repository *r, const char *, const char *);
310
311
/**
@@ -321,14 +318,13 @@ int repo_config_set_worktree_gently(struct repository *, const char *, const cha
318
/**
319
* write config values to `.git/config`, takes a key/value pair as parameter.
320
*/
324
-void git_config_set(const char *, const char *);
321
void repo_config_set(struct repository *, const char *, const char *);
322
323
int git_config_parse_key(const char *, char **, size_t *);
324
325
/*
326
* The following macros specify flag bits that alter the behavior
331
- * of the git_config_set_multivar*() methods.
327
+ * of the repo_config_set_multivar*() methods.
328
*/
329
330
/*
@@ -345,11 +341,8 @@ int git_config_parse_key(const char *, char **, size_t *);
341
*/
342
#define CONFIG_FLAGS_FIXED_VALUE (1 << 1)
343
348
-int git_config_set_multivar_gently(const char *, const char *, const char *, unsigned);
344
int repo_config_set_multivar_gently(struct repository *, const char *, const char *, const char *, unsigned);
350
-void git_config_set_multivar(const char *, const char *, const char *, unsigned);
345
void repo_config_set_multivar(struct repository *r, const char *, const char *, const char *, unsigned);
352
-int git_config_set_multivar_in_file_gently(const char *, const char *, const char *, const char *, const char *, unsigned);
346
int repo_config_set_multivar_in_file_gently(struct repository *, const char *, const char *, const char *, const char *, const char *, unsigned);
347
348
char *git_config_prepare_comment_string(const char *);
@@ -374,11 +367,6 @@ char *git_config_prepare_comment_string(const char *);
367
*
368
* It returns 0 on success.
369
*/
377
-void git_config_set_multivar_in_file(const char *config_filename,
378
- const char *key,
379
- const char *value,
380
- const char *value_pattern,
381
- unsigned flags);
370
void repo_config_set_multivar_in_file(struct repository *r,
371
const char *config_filename,
372
const char *key,
@@ -563,39 +551,11 @@ int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *i
551
int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
552
int git_configset_get_pathname(struct config_set *cs, const char *key, char **dest);
553
566
-/* Functions for reading a repository's config */
567
-struct repository;
568
-void repo_config(struct repository *repo, config_fn_t fn, void *data);
569
-
554
/**
555
* Run only the discover part of the repo_config_get_*() functions
556
* below, in addition to 1 if not found, returns negative values on
557
* error (e.g. if the key itself is invalid).
558
*/
575
-RESULT_MUST_BE_USED
576
-int repo_config_get(struct repository *repo, const char *key);
577
-int repo_config_get_value(struct repository *repo,
578
- const char *key, const char **value);
579
-RESULT_MUST_BE_USED
580
-int repo_config_get_value_multi(struct repository *repo, const char *key,
581
- const struct string_list **dest);
582
-RESULT_MUST_BE_USED
583
-int repo_config_get_string_multi(struct repository *repo, const char *key,
584
- const struct string_list **dest);
585
-int repo_config_get_string(struct repository *repo,
586
- const char *key, char **dest);
587
-int repo_config_get_string_tmp(struct repository *repo,
588
- const char *key, const char **dest);
589
-int repo_config_get_int(struct repository *repo,
590
- const char *key, int *dest);
591
-int repo_config_get_ulong(struct repository *repo,
592
- const char *key, unsigned long *dest);
593
-int repo_config_get_bool(struct repository *repo,
594
- const char *key, int *dest);
595
-int repo_config_get_bool_or_int(struct repository *repo,
596
- const char *key, int *is_bool, int *dest);
597
-int repo_config_get_maybe_bool(struct repository *repo,
598
- const char *key, int *dest);
559
int repo_config_get_pathname(struct repository *repo,
560
const char *key, char **dest);
561
@@ -611,17 +571,17 @@ void git_protected_config(config_fn_t fn, void *data);
571
* -------------------------------
572
*
573
* For programs wanting to query for specific variables in a non-callback
614
- * manner, the config API provides two functions `git_config_get_value`
615
- * and `git_config_get_value_multi`. They both read values from an internal
574
+ * manner, the config API provides two functions `repo_config_get_value`
575
+ * and `repo_config_get_value_multi`. They both read values from an internal
576
* cache generated previously from reading the config files.
577
*
618
- * For those git_config_get*() functions that aren't documented,
578
+ * For those repo_config_get*() functions that aren't documented,
579
* consult the corresponding repo_config_get*() function's
580
* documentation.
581
*/
582
583
RESULT_MUST_BE_USED
624
-int git_config_get(const char *key);
584
+int repo_config_get(struct repository *r, const char *key);
585
586
/**
587
* Finds the highest-priority value for the configuration variable `key`,
@@ -630,7 +590,7 @@ int git_config_get(const char *key);
590
* `value`. The caller should not free or modify `value`, as it is owned
591
* by the cache.
592
*/
633
-int git_config_get_value(const char *key, const char **value);
593
+int repo_config_get_value(struct repository *r, const char *key, const char **value);
594
595
/**
596
* Finds and returns the value list, sorted in order of increasing priority
@@ -641,16 +601,15 @@ int git_config_get_value(const char *key, const char **value);
601
* owned by the cache.
602
*/
603
RESULT_MUST_BE_USED
644
-int git_config_get_value_multi(const char *key,
645
- const struct string_list **dest);
646
-RESULT_MUST_BE_USED
647
-int git_config_get_string_multi(const char *key,
604
+int repo_config_get_value_multi(struct repository *r, const char *key,
605
const struct string_list **dest);
606
+RESULT_MUST_BE_USED
607
+int repo_config_get_string_multi(struct repository *r, const char *key,
608
+ const struct string_list **dest);
609
610
/**
611
* Resets and invalidates the config cache.
612
*/
653
-void git_config_clear(void);
613
void repo_config_clear(struct repository *repo);
614
615
/**
@@ -659,14 +618,15 @@ void repo_config_clear(struct repository *repo);
618
* error message and returns -1. When the configuration variable `key` is
619
* not found, returns 1 without touching `dest`.
620
*/
662
-int git_config_get_string(const char *key, char **dest);
621
+int repo_config_get_string(struct repository *r, const char *key, char **dest);
622
623
/**
665
- * Similar to `git_config_get_string`, but does not allocate any new
624
+ * Similar to `repo_config_get_string`, but does not allocate any new
625
* memory; on success `dest` will point to memory owned by the config
626
* machinery, which could be invalidated if it is discarded and reloaded.
627
*/
669
-int git_config_get_string_tmp(const char *key, const char **dest);
628
+int repo_config_get_string_tmp(struct repository *r,
629
+ const char *key, const char **dest);
630
631
/**
632
* Finds and parses the value to an integer for the configuration variable
@@ -674,12 +634,13 @@ int git_config_get_string_tmp(const char *key, const char **dest);
634
* `dest` and returns 0. When the configuration variable `key` is not found,
635
* returns 1 without touching `dest`.
636
*/
677
-int git_config_get_int(const char *key, int *dest);
637
+int repo_config_get_int(struct repository *r, const char *key, int *dest);
638
639
/**
680
- * Similar to `git_config_get_int` but for unsigned longs.
640
+ * Similar to `repo_config_get_int` but for unsigned longs.
641
*/
682
-int git_config_get_ulong(const char *key, unsigned long *dest);
642
+int repo_config_get_ulong(struct repository *r,
643
+ const char *key, unsigned long *dest);
644
645
/**
646
* Finds and parses the value into a boolean value, for the configuration
@@ -690,25 +651,21 @@ int git_config_get_ulong(const char *key, unsigned long *dest);
651
* configuration variable `key` is not found, returns 1 without touching
652
* `dest`.
653
*/
693
-int git_config_get_bool(const char *key, int *dest);
654
+int repo_config_get_bool(struct repository *r, const char *key, int *dest);
655
656
/**
696
- * Similar to `git_config_get_bool`, except that integers are copied as-is,
657
+ * Similar to `repo_config_get_bool`, except that integers are copied as-is,
658
* and `is_bool` flag is unset.
659
*/
699
-int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest);
660
+int repo_config_get_bool_or_int(struct repository *r, const char *key,
661
+ int *is_bool, int *dest);
662
663
/**
702
- * Similar to `git_config_get_bool`, except that it returns -1 on error
664
+ * Similar to `repo_config_get_bool`, except that it returns -1 on error
665
* rather than dying.
666
*/
705
-int git_config_get_maybe_bool(const char *key, int *dest);
706
-
707
-/**
708
- * Similar to `git_config_get_string`, but expands `~` or `~user` into
709
- * the user's home directory when found at the beginning of the path.
710
- */
711
-int git_config_get_pathname(const char *key, char **dest);
667
+int repo_config_get_maybe_bool(struct repository *r,
668
+ const char *key, int *dest);
669
670
int repo_config_get_index_threads(struct repository *r, int *dest);
671
int repo_config_get_split_index(struct repository *r);
@@ -732,7 +689,7 @@ NORETURN void git_die_config(struct repository *r, const char *key, const char *
689
/**
690
* Helper function which formats the die error message according to the
691
* parameters entered. Used by `git_die_config()`. It can be used by callers
735
- * handling `git_config_get_value_multi()` to print the correct error message
692
+ * handling `repo_config_get_value_multi()` to print the correct error message
693
* for the desired value.
694
*/
695
NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr);
@@ -741,4 +698,140 @@ NORETURN void git_die_config_linenr(const char *key, const char *filename, int l
698
lookup_config(mapping, ARRAY_SIZE(mapping), var)
699
int lookup_config(const char **mapping, int nr_mapping, const char *var);
700
701
+# ifdef USE_THE_REPOSITORY_VARIABLE
702
+static inline void git_config(config_fn_t fn, void *data)
703
+{
704
+ repo_config(the_repository, fn, data);
705
+}
706
+
707
+static inline void git_config_clear(void)
708
+{
709
+ repo_config_clear(the_repository);
710
+}
711
+
712
+static inline int git_config_get(const char *key)
713
+{
714
+ return repo_config_get(the_repository, key);
715
+}
716
+
717
+static inline int git_config_get_value(const char *key, const char **value)
718
+{
719
+ return repo_config_get_value(the_repository, key, value);
720
+}
721
+
722
+static inline int git_config_get_value_multi(const char *key, const struct string_list **dest)
723
+{
724
+ return repo_config_get_value_multi(the_repository, key, dest);
725
+}
726
+
727
+static inline int git_config_get_string_multi(const char *key,
728
+ const struct string_list **dest)
729
+{
730
+ return repo_config_get_string_multi(the_repository, key, dest);
731
+}
732
+
733
+static inline int git_config_get_string(const char *key, char **dest)
734
+{
735
+ return repo_config_get_string(the_repository, key, dest);
736
+}
737
+
738
+static inline int git_config_get_string_tmp(const char *key, const char **dest)
739
+{
740
+ return repo_config_get_string_tmp(the_repository, key, dest);
741
+}
742
+
743
+static inline int git_config_get_int(const char *key, int *dest)
744
+{
745
+ return repo_config_get_int(the_repository, key, dest);
746
+}
747
+
748
+static inline int git_config_get_ulong(const char *key, unsigned long *dest)
749
+{
750
+ return repo_config_get_ulong(the_repository, key, dest);
751
+}
752
+
753
+static inline int git_config_get_bool(const char *key, int *dest)
754
+{
755
+ return repo_config_get_bool(the_repository, key, dest);
756
+}
757
+
758
+static inline int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest)
759
+{
760
+ return repo_config_get_bool_or_int(the_repository, key, is_bool, dest);
761
+}
762
+
763
+static inline int git_config_get_maybe_bool(const char *key, int *dest)
764
+{
765
+ return repo_config_get_maybe_bool(the_repository, key, dest);
766
+}
767
+
768
+static inline int git_config_get_pathname(const char *key, char **dest)
769
+{
770
+ return repo_config_get_pathname(the_repository, key, dest);
771
+}
772
+
773
+static inline void git_config_set_in_file(const char *config_filename,
774
+ const char *key, const char *value)
775
+{
776
+ repo_config_set_in_file(the_repository, config_filename, key, value);
777
+}
778
+
779
+static inline int git_config_set_gently(const char *key, const char *value)
780
+{
781
+ return repo_config_set_gently(the_repository, key, value);
782
+}
783
+
784
+static inline void git_config_set(const char *key, const char *value)
785
+{
786
+ repo_config_set(the_repository, key, value);
787
+}
788
+
789
+static inline int git_config_set_in_file_gently(
790
+ const char *config_filename,
791
+ const char *key,
792
+ const char *comment,
793
+ const char *value)
794
+{
795
+ return repo_config_set_in_file_gently(the_repository, config_filename,
796
+ key, comment, value);
797
+}
798
+
799
+static inline int git_config_set_multivar_in_file_gently(
800
+ const char *config_filename,
801
+ const char *key, const char *value,
802
+ const char *value_pattern,
803
+ const char *comment,
804
+ unsigned flags)
805
+{
806
+ return repo_config_set_multivar_in_file_gently(the_repository, config_filename,
807
+ key, value, value_pattern,
808
+ comment, flags);
809
+}
810
+
811
+static inline void git_config_set_multivar_in_file(
812
+ const char *config_filename,
813
+ const char *key,
814
+ const char *value,
815
+ const char *value_pattern,
816
+ unsigned flags)
817
+{
818
+ repo_config_set_multivar_in_file(the_repository, config_filename,
819
+ key, value, value_pattern, flags);
820
+}
821
+
822
+static inline int git_config_set_multivar_gently(const char *key, const char *value,
823
+ const char *value_pattern, unsigned flags)
824
+{
825
+ return repo_config_set_multivar_gently(the_repository, key, value,
826
+ value_pattern, flags);
827
+}
828
+
829
+static inline void git_config_set_multivar(const char *key, const char *value,
830
+ const char *value_pattern, unsigned flags)
831
+{
832
+ repo_config_set_multivar(the_repository, key, value,
833
+ value_pattern, flags);
834
+}
835
+# endif /* USE_THE_REPOSITORY_VARIABLE */
836
+
837
#endif /* CONFIG_H */