Skip to content

Commit cf06749

Browse files
More forcefully manage checkouts
Hopefully prevents "error: ... local changes would be overriden"
1 parent f6bedd7 commit cf06749

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

homu/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg,
959959

960960
utils.logged_call(git_cmd('fetch', 'origin', state.base_ref,
961961
'pull/{}/head'.format(state.num)))
962+
utils.silent_call(git_cmd('reset', '--hard'))
962963
utils.silent_call(git_cmd('rebase', '--abort'))
963964
utils.silent_call(git_cmd('merge', '--abort'))
964965

@@ -999,6 +1000,7 @@ def create_merge(state, repo_cfg, branch, logger, git_cfg,
9991000
else:
10001001
utils.logged_call(git_cmd(
10011002
'checkout',
1003+
'-f',
10021004
'-B',
10031005
'homu-tmp',
10041006
state.head_sha))

0 commit comments

Comments
 (0)