chore: save HEAD when git-import-patches runs (#17824)
This commit is contained in:
parent
f901170a4f
commit
fdaa75354a
3 changed files with 41 additions and 8 deletions
|
@ -102,6 +102,12 @@ def get_head_commit(repo):
|
|||
return subprocess.check_output(args).strip()
|
||||
|
||||
|
||||
def update_ref(repo, ref, newvalue):
|
||||
args = ['git', '-C', repo, 'update-ref', ref, newvalue]
|
||||
|
||||
return subprocess.check_call(args)
|
||||
|
||||
|
||||
def reset(repo):
|
||||
args = ['git', '-C', repo, 'reset']
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue