Commit 1a09ed9
committed
Hardens working tree comparison logic
- Adds an early return when the target reference is null
- Combines checks for revision ranges and staged changes into a single statement
- Updates the fallback logic to only consider comparisons against 'HEAD' without a source as a working tree comparison
- Prevents untracked files from being incorrectly included when diffing specific commits, as those comparisons do not actually target the working tree1 parent a5b0077 commit 1a09ed9
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
1062 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| 1067 | + | |
1066 | 1068 | | |
1067 | 1069 | | |
1068 | | - | |
1069 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1070 | 1075 | | |
1071 | 1076 | | |
1072 | 1077 | | |
| |||
0 commit comments