(ref: string | undefined)
| 1494 | } |
| 1495 | |
| 1496 | function parsePushRefspec(ref: string | undefined): { ref?: string; remoteRef?: string } { |
| 1497 | if (ref === undefined) return {}; |
| 1498 | const colon = ref.indexOf(":"); |
| 1499 | if (colon <= 0 || colon !== ref.lastIndexOf(":") || colon === ref.length - 1) { |
| 1500 | return { ref }; |
| 1501 | } |
| 1502 | return { ref: ref.slice(0, colon), remoteRef: ref.slice(colon + 1) }; |
| 1503 | } |
| 1504 | |
| 1505 | // --------------------------------------------------------------- |
| 1506 | // pull |