Commit fd9fa26
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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 7612a76 commit fd9fa26
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 | | |
| |||
1972 | 1990 | | |
1973 | 1991 | | |
1974 | 1992 | | |
1975 | | - | |
1976 | | - | |
| 1993 | + | |
1977 | 1994 | | |
1978 | | - | |
1979 | 1995 | | |
1980 | 1996 | | |
1981 | 1997 | | |
| |||
2243 | 2259 | | |
2244 | 2260 | | |
2245 | 2261 | | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
| 2262 | + | |
| 2263 | + | |
2250 | 2264 | | |
2251 | | - | |
2252 | 2265 | | |
2253 | 2266 | | |
2254 | 2267 | | |
| |||
0 commit comments