Commit ab5e4b6
remote: die on config error when setting/adding branches
When we add or set new branches (e.g. by `git remote add -f` or
`git remote set-branches`) we do not check for error codes when
writing the branches to the configuration file. When persisting
the configuration failed we are left with a remote that has none
or not all of the branches that should have been set without
notifying the user.
Fix this issue by dying early on configuration error.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 45ebdcc commit ab5e4b6
1 file changed
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 209 | + | |
| 210 | + | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
| |||
1412 | 1411 | | |
1413 | 1412 | | |
1414 | 1413 | | |
1415 | | - | |
1416 | | - | |
| 1414 | + | |
| 1415 | + | |
1417 | 1416 | | |
1418 | 1417 | | |
1419 | 1418 | | |
1420 | 1419 | | |
1421 | 1420 | | |
1422 | 1421 | | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
| 1422 | + | |
1427 | 1423 | | |
1428 | 1424 | | |
1429 | | - | |
1430 | 1425 | | |
1431 | 1426 | | |
1432 | 1427 | | |
| |||
1445 | 1440 | | |
1446 | 1441 | | |
1447 | 1442 | | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
| 1443 | + | |
1452 | 1444 | | |
1453 | 1445 | | |
1454 | 1446 | | |
| |||
0 commit comments