Repository navigation
Commit a7d45dc
committed
test(commit): port whitespace header regression against Git
Port the regression from PR #2303 for CR-only, space-only and tab-only
header lines. Each initial commit is created by `commit.sh`, accepted by
`git fsck --strict`, and projected by `git show` before comparing both
`Commit._deserialize()` and the public lazy commit reader. A forged
`Co-authored-by` header must stay outside the message and co-author list.
The existing LF-only header parser already passes these cases, so no
production fix is needed. Record GIX-31: GixPython 0.2.0 rejects CR/tab
header lines that Git 2.54.0 accepts. The tests preserve and verify the
existing native decoder diagnostic fallback; the space continuation
uses the existing GIX-30 late-encoding fallback.
Validation: all 41 tests and 24 subtests in `test/test_commit.py` pass
with both `GIT_PYTHON_BACKEND=cli` and `GIT_PYTHON_BACKEND=gix`.
`ruff check`, `bash -n` and `git diff --check` pass.1 parent ae03abd commit a7d45dc
3 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| 926 | + | |
926 | 927 | | |
927 | 928 | | |
928 | 929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
569 | 602 | | |
570 | 603 | | |
571 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
0 commit comments