mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
git_stash_pop: Add only updated files
This avoids adding untracked files to the repo. See here for a description of the difference between `git add .` and `git add --update`: https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add/572660#572660
This commit is contained in:
parent
5734412d82
commit
f4cc88f6c7
@ -15,4 +15,4 @@ def test_match(stderr):
|
||||
|
||||
def test_get_new_command(stderr):
|
||||
assert (get_new_command(Command('git stash pop', stderr=stderr))
|
||||
== "git add . && git stash pop && git reset .")
|
||||
== "git add --update && git stash pop && git reset .")
|
||||
|
@ -11,7 +11,7 @@ def match(command):
|
||||
|
||||
@git_support
|
||||
def get_new_command(command):
|
||||
return shell.and_('git add .', 'git stash pop', 'git reset .')
|
||||
return shell.and_('git add --update', 'git stash pop', 'git reset .')
|
||||
|
||||
|
||||
# make it come before the other applicable rules
|
||||
|
Loading…
x
Reference in New Issue
Block a user