From c8d949959404e8db48ef7090b5bac67b463e5130 Mon Sep 17 00:00:00 2001 From: v4rgas <66626747+v4rgas@users.noreply.github.com> Date: Thu, 15 May 2025 17:29:05 -0400 Subject: [PATCH 1/2] f15405ea-141a-4930-b745-1e46f192e3a9 --- thefuck_5/tests/rules/test_git_push.py | 17 ----------------- thefuck_5/thefuck/rules/git_push.py | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/thefuck_5/tests/rules/test_git_push.py b/thefuck_5/tests/rules/test_git_push.py index b6aa7c6..cf45f4e 100644 --- a/thefuck_5/tests/rules/test_git_push.py +++ b/thefuck_5/tests/rules/test_git_push.py @@ -15,19 +15,6 @@ def output(branch_name): '''.format(branch_name, branch_name) -@pytest.fixture -def output_bitbucket(): - return '''Total 0 (delta 0), reused 0 (delta 0) -remote: -remote: Create pull request for feature/set-upstream: -remote: https://bitbucket.org/set-upstream -remote: -To git@bitbucket.org:test.git - e5e7fbb..700d998 feature/set-upstream -> feature/set-upstream -Branch feature/set-upstream set up to track remote branch feature/set-upstream from origin. -''' - - @pytest.mark.parametrize('script, branch_name', [ ('git push', 'master'), ('git push origin', 'master')]) @@ -35,10 +22,6 @@ def test_match(output, script, branch_name): assert match(Command(script, output)) -def test_match_bitbucket(output_bitbucket): - assert not match(Command('git push origin', output_bitbucket)) - - @pytest.mark.parametrize('script, branch_name', [ ('git push master', None), ('ls', 'master')]) diff --git a/thefuck_5/thefuck/rules/git_push.py b/thefuck_5/thefuck/rules/git_push.py index cccee67..551b25d 100644 --- a/thefuck_5/thefuck/rules/git_push.py +++ b/thefuck_5/thefuck/rules/git_push.py @@ -6,7 +6,7 @@ @git_support def match(command): return ('push' in command.script_parts - and 'git push --set-upstream' in command.output) + and 'set-upstream' in command.output) def _get_upstream_option_index(command_parts): From 04be7ba10954729ae246cafdb04e75cb65cbeda4 Mon Sep 17 00:00:00 2001 From: v4rgas <66626747+v4rgas@users.noreply.github.com> Date: Thu, 15 May 2025 17:30:00 -0400 Subject: [PATCH 2/2] Add thefuck_5 test case with related issue link --- readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 62b709f..1f7c120 100644 --- a/readme.md +++ b/readme.md @@ -73,4 +73,7 @@ Each test case below corresponds to a buggy-to-fixed repository pair. - https://github.com/nvbn/thefuck/issues/869 - thefuck_4 - Related issues: - - https://github.com/nvbn/thefuck/issues/807 \ No newline at end of file + - https://github.com/nvbn/thefuck/issues/807 +- thefuck_5 + - Related issues: + - https://github.com/nvbn/thefuck/issues/723 \ No newline at end of file