Commit 194c3f1
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 0a666e0 commit 194c3f1
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1922 | 1922 | | |
1923 | 1923 | | |
1924 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
1925 | 1943 | | |
1926 | 1944 | | |
1927 | 1945 | | |
| |||
1970 | 1988 | | |
1971 | 1989 | | |
1972 | 1990 | | |
1973 | | - | |
1974 | | - | |
| 1991 | + | |
1975 | 1992 | | |
1976 | | - | |
1977 | 1993 | | |
1978 | 1994 | | |
1979 | 1995 | | |
| |||
2241 | 2257 | | |
2242 | 2258 | | |
2243 | 2259 | | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
| 2260 | + | |
| 2261 | + | |
2248 | 2262 | | |
2249 | | - | |
2250 | 2263 | | |
2251 | 2264 | | |
2252 | 2265 | | |
| |||
0 commit comments