Commit e6bea66
remote prune: optimize "dangling symref" check/warning
When 'git remote prune' was used to delete many refs in a repository
with many refs, a lot of time was spent checking for (now) dangling
symbolic refs pointing to the deleted ref, since warn_dangling_symref()
was once per deleted ref to check all other refs in the repository.
Avoid this using the new warn_dangling_symrefs() function which
makes one pass over all refs and checks for all the deleted refs in
one go, after they have all been deleted.
Signed-off-by: Jens Lindström <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent c9e768b commit e6bea66
3 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
| 1316 | + | |
1316 | 1317 | | |
1317 | 1318 | | |
1318 | 1319 | | |
| |||
1339 | 1340 | | |
1340 | 1341 | | |
1341 | 1342 | | |
| 1343 | + | |
| 1344 | + | |
1342 | 1345 | | |
1343 | 1346 | | |
1344 | 1347 | | |
| |||
1348 | 1351 | | |
1349 | 1352 | | |
1350 | 1353 | | |
1351 | | - | |
1352 | 1354 | | |
1353 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
1354 | 1359 | | |
1355 | 1360 | | |
1356 | 1361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1611 | 1611 | | |
1612 | 1612 | | |
1613 | 1613 | | |
| 1614 | + | |
1614 | 1615 | | |
1615 | 1616 | | |
1616 | 1617 | | |
| |||
1625 | 1626 | | |
1626 | 1627 | | |
1627 | 1628 | | |
1628 | | - | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1629 | 1633 | | |
| 1634 | + | |
1630 | 1635 | | |
1631 | 1636 | | |
1632 | 1637 | | |
| |||
1639 | 1644 | | |
1640 | 1645 | | |
1641 | 1646 | | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
1642 | 1659 | | |
1643 | 1660 | | |
1644 | 1661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
0 commit comments