git_push: Handle command containing force argument (#818)

This commit is contained in:
Matthieu Guilbert
2018-07-10 06:48:08 +08:00
committed by Vladimir Iakovlev
parent a6bb41e802
commit 534782414f
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -39,6 +39,6 @@ def get_new_command(command):
while len(command_parts) > push_idx and command_parts[len(command_parts) - 1][0] != '-':
command_parts.pop(len(command_parts) - 1)
arguments = re.findall(r'git push (.*)', command.output)[0].replace("'", r"\'").strip()
arguments = re.findall(r'git push (.*)', command.output)[-1].replace("'", r"\'").strip()
return replace_argument(" ".join(command_parts), 'push',
'push {}'.format(arguments))