Commit 867bc1d
rebase-merges: move labels' whitespace mangling into
One of the trickier aspects of the design of `git rebase
--rebase-merges` is the way labels are generated for the initial todo
list: those labels are supposed to be intuitive and first and foremost
unique.
To that end, `label_oid()` appends a unique suffix when necessary.
Those labels not only need to be unique, but they also need to be valid
refs. To make sure of that, `make_script_with_merges()` replaces
whitespace by dashes.
That would appear to be the wrong layer for that sanitizing step,
though: all callers of `label_oid()` should get that same benefit.
Even if it does not make a difference currently (the only called of
`label_oid()` that passes a label that might need to be sanitized _is_
`make_script_with_merges()`), let's move the responsibility for
sanitizing labels into the `label_oid()` function.
This commit is best viewed with `-w` because it unfortunately needs to
change the indentation of a large block of code in `label_oid()`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>label_oid()
1 parent d9f6f3b commit 867bc1d
1 file changed
+28
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4423 | 4423 | | |
4424 | 4424 | | |
4425 | 4425 | | |
4426 | | - | |
4427 | 4426 | | |
4428 | 4427 | | |
4429 | 4428 | | |
| |||
4443 | 4442 | | |
4444 | 4443 | | |
4445 | 4444 | | |
| 4445 | + | |
4446 | 4446 | | |
4447 | 4447 | | |
4448 | 4448 | | |
4449 | | - | |
4450 | 4449 | | |
4451 | 4450 | | |
4452 | 4451 | | |
| |||
4469 | 4468 | | |
4470 | 4469 | | |
4471 | 4470 | | |
4472 | | - | |
4473 | | - | |
4474 | | - | |
4475 | | - | |
4476 | | - | |
4477 | | - | |
4478 | | - | |
4479 | | - | |
4480 | | - | |
4481 | | - | |
4482 | | - | |
| 4471 | + | |
4483 | 4472 | | |
4484 | 4473 | | |
4485 | | - | |
4486 | | - | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
4487 | 4477 | | |
4488 | | - | |
4489 | | - | |
4490 | | - | |
4491 | | - | |
4492 | | - | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
4496 | 4490 | | |
4497 | | - | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
4498 | 4502 | | |
4499 | 4503 | | |
4500 | 4504 | | |
| |||
4596 | 4600 | | |
4597 | 4601 | | |
4598 | 4602 | | |
4599 | | - | |
4600 | | - | |
4601 | | - | |
4602 | | - | |
4603 | 4603 | | |
4604 | 4604 | | |
4605 | 4605 | | |
| |||
0 commit comments