| 287 | } |
| 288 | |
| 289 | function parseRefRange(ref: string): RefRange | null { |
| 290 | const threeDotIndex = ref.indexOf(RANGE_SEPARATOR.THREE_DOT); |
| 291 | if (threeDotIndex !== -1) { |
| 292 | return { |
| 293 | left: ref.slice(0, threeDotIndex), |
| 294 | right: ref.slice(threeDotIndex + RANGE_SEPARATOR.THREE_DOT.length), |
| 295 | }; |
| 296 | } |
| 297 | |
| 298 | const twoDotIndex = ref.indexOf(RANGE_SEPARATOR.TWO_DOT); |
| 299 | if (twoDotIndex !== -1) { |
| 300 | return { |
| 301 | left: ref.slice(0, twoDotIndex), |
| 302 | right: ref.slice(twoDotIndex + RANGE_SEPARATOR.TWO_DOT.length), |
| 303 | }; |
| 304 | } |
| 305 | |
| 306 | return null; |
| 307 | } |
| 308 | |
| 309 | export function resolveCommittedComparison(left: string, right: string): ResolvedScope { |
| 310 | const effectiveLeft = left || "HEAD"; |