Skip to content

Commit

Permalink
nvbn#618: Refine git_push_without_commits rule
Browse files Browse the repository at this point in the history
  • Loading branch information
nvbn committed Mar 22, 2017
1 parent e70c573 commit 8015aa6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions thefuck/rules/git_push_without_commits.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import re
from thefuck.specific.git import git_support

fix = 'git commit -m "Initial commit." && {command}'
fix = u'git commit -m "Initial commit." && {command}'
refspec_does_not_match = re.compile(r'src refspec \w+ does not match any\.')


@git_support
def match(command):
if refspec_does_not_match.search(command.stderr):
return True

return False
return bool(refspec_does_not_match.search(command.stderr))


def get_new_command(command):
Expand Down

0 comments on commit 8015aa6

Please sign in to comment.