Stash unstaged changes before running pylint#37
Conversation
|
Thanks for this PR. I'm gonna review it. |
|
@sebdah Any chance you could take a look at this? I promise the diff isn't as scary as it looks; most of it is just indenting code 4 spaces to put it under the context manager. I haven't fixed the merge conflicts yet since if you decide you don't like the overall approach I'm taking there may be no point. Let me know if you'd prefer me to fix those first. |
|
@evanunderscore I'm fine with this PR, so if you get the conflicts resolved, I'll merge it. |
f3516cf to
a2e41a5
Compare
|
@sebdah Thanks, done. Build failure seems to be due to something dropping support for 3.2 (see travis-ci/travis-ci#5517). |
|
Just want to chime in and say that I run my own stash and pop before running Didn't notice a test for this very situation, so wanted to provide some anecdotal evidence. Thanks guys! Looks like a solid implementation! |
Addresses issue #26. Unstaged changes are stashed using
git stash --keep-indexbefore running any tests, then restored usinggit reset --hardandgit stash pop --indexafterwards. Untracked files are left untouched. Note thatgit stashdoesn't work if there is no initial commit, so in this case it prints a warning then behaves as it did previously.