Commit 1e06eb9
config: unify code paths to get global config paths
There's two callsites which assemble global config paths, once in the
config loading code and once in the git-config(1) builtin. We're about
to implement a way to override global config paths via an environment
variable which would require us to adjust both sites.
Unify both code paths into a single `git_global_config()` function which
returns both paths for `~/.gitconfig` and the XDG config file. This will
make the subsequent patch which introduces the new envvar easier to
implement.
No functional changes are expected from this patch.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c62a999 commit 1e06eb9
3 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
| 674 | + | |
676 | 675 | | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1849 | 1849 | | |
1850 | 1850 | | |
1851 | 1851 | | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1852 | 1858 | | |
1853 | 1859 | | |
1854 | 1860 | | |
| |||
1881 | 1887 | | |
1882 | 1888 | | |
1883 | 1889 | | |
1884 | | - | |
1885 | | - | |
| 1890 | + | |
| 1891 | + | |
1886 | 1892 | | |
1887 | 1893 | | |
1888 | 1894 | | |
| |||
1900 | 1906 | | |
1901 | 1907 | | |
1902 | 1908 | | |
| 1909 | + | |
| 1910 | + | |
1903 | 1911 | | |
1904 | 1912 | | |
1905 | 1913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
0 commit comments