Mislav Marohnić
11fbb60ae7
Rename the module to "github.com/cli/cli/v2"
2021-08-25 12:41:30 +02:00
Mislav Marohnić
f4bded30f8
Mark test helper
2021-08-10 14:30:55 +02:00
Mislav Marohnić
0f1ab13b9e
Only check if working copy is dirty when syncing current branch
...
In other cases, we don't have to abort the operation since it can
proceed without being affected by the working copy at all.
2021-08-10 14:29:23 +02: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
174e26ecac
Fix tests
2021-08-04 18:26:30 -07:00
Sam Coe
a1e1842e6d
Catch a couple more edge cases
2021-06-29 20:48:30 -07:00
Sam Coe
0b80c30789
Fix remote resolving for source repo
2021-06-28 17:00:06 -07:00
Sam Coe
5481b2b5e6
Move dirty repo check before any network calls
2021-06-24 09:08:36 -07:00
Sam Coe
8219710551
Address PR comments
2021-06-23 14:20:14 -07:00
Sam Coe
0e838052a4
Rewrite tests with new mocks
2021-06-23 12:01:58 -07:00
Sam Coe
8423de7f50
Add tests
2021-06-14 10:54:28 -04:00
Sam Coe
8b5abc77ea
Extract git interactions into interface
2021-06-14 10:51:51 -04:00
Sam Coe
c6f89d3c17
Start tests
2021-06-14 10:51:50 -04:00