Commit 05596e9
fetch-pack: split out fsck config parsing
When `fetch_pack_config()` is invoked, fetch-pack configuration is
parsed from the config. As part of this operation, fsck message severity
configuration is assigned to the `fsck_msg_types` global variable. This
is optionally used to configure the downstream git-index-pack(1) when
the `--strict` option is specified.
The same parsed fsck message severity configuration is also needed
outside of fetch-pack. Instead of exposing/relying on the existing
global state, split out the fsck config parsing logic into
`fetch_pack_fsck_config()` and expose it. In a subsequent commit, this
is used to provide fsck configuration when invoking `unbundle()`.
For `fetch_pack_fsck_config()` to discern between errors and unhandled
config variables, the return code when `git_config_path()` errors is
changed to a different value also indicating success. This frees up the
previous return code to now indicate the provided config variable
was unhandled. The behavior remains functionally the same.
Signed-off-by: Justin Tobler <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 187574c commit 05596e9
2 files changed
+29
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1857 | 1857 | | |
1858 | 1858 | | |
1859 | 1859 | | |
1860 | | - | |
1861 | | - | |
| 1860 | + | |
| 1861 | + | |
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | 1867 | | |
1868 | 1868 | | |
1869 | | - | |
1870 | | - | |
1871 | | - | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
1872 | 1872 | | |
1873 | 1873 | | |
1874 | 1874 | | |
| |||
1877 | 1877 | | |
1878 | 1878 | | |
1879 | 1879 | | |
1880 | | - | |
1881 | | - | |
| 1880 | + | |
| 1881 | + | |
1882 | 1882 | | |
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
1886 | 1886 | | |
1887 | | - | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
1888 | 1898 | | |
1889 | 1899 | | |
1890 | 1900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
0 commit comments