Repository navigation
Commit 22f137d
review
- [P2] Ignore comment text when validating continued values —
/Users/byron/dev/github.com/gitpython-developers/GitPython.fix-config-unquoted
-escape-parsing/git/config.py:576-577 With `k = one\` followed by ` two
# C:\Users`, the joined value still contains the second line's comment.
This check treats its `\U` as an unknown escape and skips `parse_value()`,
returning `one two # C:\Users` instead of `one two`, unlike Git and `main`.
Updating an unrelated option then persists the comment as part of the value.
Strip or skip unquoted comment text before validating escapes.
- [P2] Preserve whitespace before an EOF continuation backslash —
/Users/byron/dev/github.com/gitpython-developers/GitPython.fix-config-unquoted
-escape-parsing/git/config.py:652-653 If the final config line is `k = value
\`, with or without a terminating newline, Git and `main` return `"value
"`. The EOF branch removes the backslash first, so this newly applied
`parse_value()` discards the preceding space and returns `"value"`. Updating
an unrelated option also persists that change. Preserve whitespace made
significant by the continuation when decoding.
Assisted-by: GPT 6.1 Sol
Co-authored-by: GPT 6.1 Sol <codex@openai.com>1 parent 983e182 commit 22f137d
2 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
635 | 636 | | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
640 | | - | |
641 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
| |||
649 | 651 | | |
650 | 652 | | |
651 | 653 | | |
| 654 | + | |
652 | 655 | | |
653 | 656 | | |
| 657 | + | |
| 658 | + | |
654 | 659 | | |
655 | 660 | | |
656 | 661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
381 | 408 | | |
382 | 409 | | |
383 | 410 | | |
| |||
0 commit comments