git-upload: pass committer to 'git rebase' (fix #1749) (#1750)

No committer was specified, which resulted in failing `git rebase` if
the branch is not up-to-date.
This commit is contained in:
Egor Suvorov
2022-05-19 13:01:03 +02:00
committed by GitHub
parent ee3bcf108d
commit baf7a81dce

View File

@@ -80,12 +80,14 @@ class GitRepo:
print('No changes detected, quitting')
return
run([
git_with_user = [
'git',
'-c',
'user.name=vipvap',
'-c',
'user.email=vipvap@zenith.tech',
]
run(git_with_user + [
'commit',
'--author="vipvap <vipvap@zenith.tech>"',
f'--message={message}',
@@ -94,7 +96,7 @@ class GitRepo:
for _ in range(5):
try:
run(['git', 'fetch', 'origin', branch])
run(['git', 'rebase', f'origin/{branch}'])
run(git_with_user + ['rebase', f'origin/{branch}'])
run(['git', 'push', 'origin', branch])
return