mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	Merge pull request #188 from mcarton/git-stash
Improve the git_stash rule
This commit is contained in:
		| @@ -151,7 +151,7 @@ using the matched rule and runs it. Rules enabled by default are as follows: | |||||||
| * `git_checkout` – creates the branch before checking-out; | * `git_checkout` – creates the branch before checking-out; | ||||||
| * `git_no_command` – fixes wrong git commands like `git brnch`; | * `git_no_command` – fixes wrong git commands like `git brnch`; | ||||||
| * `git_push` – adds `--set-upstream origin $branch` to previous failed `git push`; | * `git_push` – adds `--set-upstream origin $branch` to previous failed `git push`; | ||||||
| * `git_stash` – stashes you local modifications before rebase; | * `git_stash` – stashes you local modifications before rebasing or switching branch; | ||||||
| * `has_exists_script` – prepends `./` when script/binary exists; | * `has_exists_script` – prepends `./` when script/binary exists; | ||||||
| * `lein_not_task` – fixes wrong `lein` tasks like `lein rpl`; | * `lein_not_task` – fixes wrong `lein` tasks like `lein rpl`; | ||||||
| * `mkdir_p` – adds `-p` when you trying to create directory without parent; | * `mkdir_p` – adds `-p` when you trying to create directory without parent; | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| def match(command, settings): | def match(command, settings): | ||||||
|     return ('git' in command.script |     # catches "Please commit or stash them" and "Please, commit your changes or | ||||||
|             and 'Please commit or stash them.' in command.stderr) |     # stash them before you can switch branches." | ||||||
|  |     return 'git' in command.script and 'or stash them' in command.stderr | ||||||
|  |  | ||||||
|  |  | ||||||
| def get_new_command(command, settings): | def get_new_command(command, settings): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user