Commit 26c7974
maintenance: fix incorrect
The periodic maintenance tasks configured by `git maintenance start`
invoke `git for-each-repo` to run `git maintenance run` on each path
specified by the multi-value global configuration variable
`maintenance.repo`. Because `git for-each-repo` will likely be run
outside of the repositories which require periodic maintenance, it is
mandatory that the repository paths specified by `maintenance.repo` are
absolute.
Unfortunately, however, `git maintenance register` does nothing to
ensure that the paths it assigns to `maintenance.repo` are indeed
absolute, and may in fact -- especially in the case of a bare repository
-- assign a relative path to `maintenance.repo` instead. Fix this
problem by converting all paths to absolute before assigning them to
`maintenance.repo`.
While at it, also fix `git maintenance unregister` to convert paths to
absolute, as well, in order to ensure that it can correctly remove from
`maintenance.repo` a path assigned via `git maintenance register`.
Reported-by: Clement Moyroud <clement.moyroud@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>maintenance.repo path with bare repository1 parent 966e671 commit 26c7974
2 files changed
+46
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1461 | 1461 | | |
1462 | 1462 | | |
1463 | 1463 | | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1464 | 1474 | | |
1465 | 1475 | | |
| 1476 | + | |
1466 | 1477 | | |
1467 | 1478 | | |
1468 | 1479 | | |
| 1480 | + | |
1469 | 1481 | | |
1470 | 1482 | | |
1471 | 1483 | | |
| |||
1478 | 1490 | | |
1479 | 1491 | | |
1480 | 1492 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
| 1493 | + | |
1485 | 1494 | | |
1486 | 1495 | | |
1487 | | - | |
1488 | | - | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1489 | 1500 | | |
1490 | 1501 | | |
1491 | | - | |
1492 | | - | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1493 | 1506 | | |
1494 | 1507 | | |
1495 | 1508 | | |
1496 | | - | |
1497 | | - | |
1498 | | - | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
1499 | 1512 | | |
1500 | | - | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
1501 | 1516 | | |
1502 | 1517 | | |
1503 | 1518 | | |
1504 | 1519 | | |
| 1520 | + | |
1505 | 1521 | | |
| 1522 | + | |
1506 | 1523 | | |
1507 | 1524 | | |
1508 | 1525 | | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
1512 | | - | |
| 1526 | + | |
1513 | 1527 | | |
1514 | | - | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1515 | 1531 | | |
1516 | 1532 | | |
1517 | 1533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
635 | 648 | | |
0 commit comments