Commit graph

5 commits

Author SHA1 Message Date
EBIBO
14a8e03bc3
gh repo sync should be able to sync a local branch with an upstream remote (#8229) 2023-11-20 10:37:59 +00:00
Mislav Marohnić
66ad6ad7d0 Avoid git checkout during gh repo sync
- If the local branch already exists, use `git update-ref`
- If it needs to be created, use `git branch <newbranch>`, but don't
  switch to the new branch

Bonus fixes
- Enables operation while on detached HEAD
- Enables operation even when the current remote doesn't track all
  branches in the remote repo (uses FETCH_HEAD instead of the
  `<remote>/<branch>` syntax)
2021-08-09 22:10:52 +02:00
Sam Coe
2c4a662660
Rework git client interface 2021-08-04 18:13:58 -07:00
Sam Coe
a1e1842e6d
Catch a couple more edge cases 2021-06-29 20:48:30 -07:00
Sam Coe
0e838052a4
Rewrite tests with new mocks 2021-06-23 12:01:58 -07:00