Changesets · Branches · Tags · Compare
| Changeset | bb08e0e95ef3064edb59a1a39dd3a398db289700c911ad3518465269365e9c9d |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-10 19:26 -07:00 |
| Committer | Dallin Romney <dallinromney@gmail.com> · 2025-09-10 19:26 -07:00 |
| Parents | 91ef819325d3 |
1 file changed
modified core/tools/implementations/viewDiff.ts +11 −0
| @@ -9,6 +9,17 @@ | ||
| 9 | 9 | // TODO includeUnstaged should be an option |
| 10 | 10 | |
| 11 | 11 | const combinedDiff = diffs.join("\n"); |
| 12 | + | |
| 13 | + if (!combinedDiff.trim()) { | |
| 14 | + return [ | |
| 15 | + { | |
| 16 | + name: "Diff", | |
| 17 | + description: "current Git diff", | |
| 18 | + content: "The current diff is empty", | |
| 19 | + }, | |
| 20 | + ]; | |
| 21 | + } | |
| 22 | + | |
| 12 | 23 | const diffLines = combinedDiff.split("\n"); |
| 13 | 24 | |
| 14 | 25 | let truncated = false; |