Commit 9938d7e
committed
rebase: skip branch symref aliases
rebase --update-refs records local branch decorations before replaying
commits. If a decoration is a symbolic branch such as refs/heads/main
pointing at refs/heads/master, updating it later dereferences back to
master and can fail because the normal rebase path already moved that
branch.
Resolve local branch decorations to their referents before queuing
update-ref commands, and skip duplicates. This keeps branch aliases from
scheduling a second update for the same underlying branch while still
using the existing old-OID check for the single queued update.
Signed-off-by: Son Luong Ngoc <sluongng@gmail.com>1 parent a550923 commit 9938d7e
2 files changed
Lines changed: 36 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6445 | 6445 | | |
6446 | 6446 | | |
6447 | 6447 | | |
6448 | | - | |
6449 | | - | |
6450 | | - | |
6451 | | - | |
6452 | | - | |
| 6448 | + | |
| 6449 | + | |
| 6450 | + | |
| 6451 | + | |
6453 | 6452 | | |
6454 | 6453 | | |
6455 | 6454 | | |
6456 | 6455 | | |
| 6456 | + | |
| 6457 | + | |
6457 | 6458 | | |
6458 | 6459 | | |
6459 | 6460 | | |
6460 | 6461 | | |
6461 | 6462 | | |
6462 | 6463 | | |
6463 | 6464 | | |
| 6465 | + | |
| 6466 | + | |
| 6467 | + | |
| 6468 | + | |
6464 | 6469 | | |
6465 | 6470 | | |
6466 | 6471 | | |
6467 | 6472 | | |
6468 | | - | |
6469 | | - | |
| 6473 | + | |
| 6474 | + | |
| 6475 | + | |
| 6476 | + | |
| 6477 | + | |
| 6478 | + | |
| 6479 | + | |
| 6480 | + | |
| 6481 | + | |
| 6482 | + | |
| 6483 | + | |
| 6484 | + | |
| 6485 | + | |
| 6486 | + | |
| 6487 | + | |
| 6488 | + | |
| 6489 | + | |
| 6490 | + | |
6470 | 6491 | | |
6471 | 6492 | | |
6472 | 6493 | | |
| |||
6478 | 6499 | | |
6479 | 6500 | | |
6480 | 6501 | | |
6481 | | - | |
| 6502 | + | |
6482 | 6503 | | |
6483 | 6504 | | |
6484 | 6505 | | |
6485 | | - | |
| 6506 | + | |
6486 | 6507 | | |
6487 | 6508 | | |
6488 | 6509 | | |
6489 | | - | |
| 6510 | + | |
6490 | 6511 | | |
6491 | 6512 | | |
6492 | | - | |
6493 | | - | |
| 6513 | + | |
| 6514 | + | |
6494 | 6515 | | |
6495 | 6516 | | |
6496 | 6517 | | |
| |||
6501 | 6522 | | |
6502 | 6523 | | |
6503 | 6524 | | |
| 6525 | + | |
| 6526 | + | |
6504 | 6527 | | |
6505 | 6528 | | |
6506 | 6529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1978 | 1978 | | |
1979 | 1979 | | |
1980 | 1980 | | |
1981 | | - | |
| 1981 | + | |
1982 | 1982 | | |
1983 | 1983 | | |
1984 | 1984 | | |
| |||
0 commit comments