Commit 4e4a482
config.c: create missing parent directories when modifying config files
'git config' (--add / --unset etc.) automatically creates missing config
files. However, it fails with a misleading error message "could not lock
config file" if the parent directory doesn't exist.
Also create missing parent directories.
This is particularly important when calling
git config -f /non/existing/directory/config ...
Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent ea2f21b commit 4e4a482
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1924 | 1924 | | |
1925 | 1925 | | |
1926 | 1926 | | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
1927 | 1945 | | |
1928 | 1946 | | |
1929 | 1947 | | |
| |||
1974 | 1992 | | |
1975 | 1993 | | |
1976 | 1994 | | |
1977 | | - | |
1978 | | - | |
| 1995 | + | |
1979 | 1996 | | |
1980 | | - | |
1981 | 1997 | | |
1982 | 1998 | | |
1983 | 1999 | | |
| |||
2256 | 2272 | | |
2257 | 2273 | | |
2258 | 2274 | | |
2259 | | - | |
2260 | | - | |
2261 | | - | |
2262 | | - | |
| 2275 | + | |
| 2276 | + | |
2263 | 2277 | | |
2264 | | - | |
2265 | 2278 | | |
2266 | 2279 | | |
2267 | 2280 | | |
| |||
0 commit comments