From 4d89b3499e2e0f87563a2bcd191c8aed67c46249 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 19 Aug 2016 22:08:30 +0100 Subject: [PATCH] Preserve args for git_push --- thefuck/rules/git_push.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/thefuck/rules/git_push.py b/thefuck/rules/git_push.py index 22237105..86a2ea5a 100644 --- a/thefuck/rules/git_push.py +++ b/thefuck/rules/git_push.py @@ -1,3 +1,4 @@ +from thefuck.utils import replace_argument from thefuck.specific.git import git_support @@ -9,4 +10,5 @@ def match(command): @git_support def get_new_command(command): - return command.stderr.split('\n')[-3].strip() + push_upstream = command.stderr.split('\n')[-3].strip().partition('git ')[2] + return replace_argument(command.script, 'push', push_upstream)