Repository navigation
Commit 93e35ee
fix(git): render untracked file contents as diff additions
The body of an untracked file was inlined under a `--- /dev/null` header with no
`+` prefixes, so it was not a hunk - it was the file's own syntax sitting where
diff syntax was expected. A new markdown file's `- item` read back as a deleted
line, front matter as a header, and the generated message described changes
nobody made.
Each content line is prefixed now. A trailing newline is not turned into a bare
`+`, and the binary and unreadable markers stay unprefixed: they annotate the
block rather than claiming to be its content.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 518a8fb commit 93e35ee
2 files changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
551 | 575 | | |
552 | 576 | | |
553 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
| |||
602 | 604 | | |
603 | 605 | | |
604 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
605 | 624 | | |
606 | 625 | | |
607 | 626 | | |
| |||
618 | 637 | | |
619 | 638 | | |
620 | 639 | | |
621 | | - | |
| 640 | + | |
622 | 641 | | |
623 | 642 | | |
624 | 643 | | |
| |||
0 commit comments