Commit cb6fa28
fix(cloud-manager-client): pass ref as last pull argument (#1790)
## Summary
- `pull()` checks out the requested `ref` locally before running `git
pull`, but never told `git pull` which branch to fetch/merge — so `git
pull <url>` fell back to fetching and merging the remote's default
branch (its HEAD) into the checked-out branch.
- This could silently diverge from, or conflict with, the branch the
caller actually wanted to update.
- Fix: append `ref` as the last argument to the pull git args (mirrors
how `push()` already appends `ref`), so `git pull <url> <ref>` fetches
and merges the correct branch.
## Test plan
- [x] Added/updated unit tests in
`packages/spacecat-shared-cloud-manager-client/test/cloud-manager-client.test.js`
covering: ref appended as last arg for BYOG and standard repos, and no
ref arg appended when `ref` is omitted.
- [x] `npm test -w packages/spacecat-shared-cloud-manager-client` — 87
passing, 100% coverage.
- [x] `npm run lint -w packages/spacecat-shared-cloud-manager-client` —
clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Ramon Bisswanger <bisswang@adobe.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent c50606e commit cb6fa28
2 files changed
Lines changed: 72 additions & 1 deletion
File tree
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
912 | 919 | | |
913 | 920 | | |
914 | 921 | | |
| |||
Lines changed: 65 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1393 | 1393 | | |
1394 | 1394 | | |
1395 | 1395 | | |
1396 | | - | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1397 | 1401 | | |
1398 | 1402 | | |
1399 | 1403 | | |
1400 | 1404 | | |
1401 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
1402 | 1466 | | |
1403 | 1467 | | |
1404 | 1468 | | |
| |||
0 commit comments