Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no longer include untracked files in backup stash #827

Merged
merged 2 commits into from Apr 5, 2020

Conversation

iiroj
Copy link
Member

@iiroj iiroj commented Apr 3, 2020

Since v10.1 having untracked files in the backup stash causes revert to fail, because the stash will not apply with the same files already on disk.

Fixes #826

@iiroj
Copy link
Member Author

iiroj commented Apr 3, 2020

This happens because when reverting, we call git reset, which doesn't touch untracked files. It's now safe to simply not have untracked files in the stash, because nothing touches them (unless tasks do something).

@codecov
Copy link

codecov bot commented Apr 3, 2020

Codecov Report

Merging #827 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #827   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          513       513           
  Branches       109       109           
=========================================
  Hits           513       513           
Impacted Files Coverage Δ
lib/runAll.js 100.00% <ø> (ø)
lib/gitWorkflow.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78a677a...76cf26b. Read the comment docs.

okonet
okonet previously approved these changes Apr 3, 2020
@iiroj
Copy link
Member Author

iiroj commented Apr 3, 2020

@okonet Travis integration is broken, but you can see that it passed here: https://travis-ci.org/github/okonet/lint-staged/builds/670434608

I'm unable to merge because the button is disabled.

@okonet
Copy link
Collaborator

okonet commented Apr 3, 2020

Yeah I don’t know why it’s not working anymore

okonet
okonet previously approved these changes Apr 4, 2020
Since v10.1 having untracked files in the backup stash causes revert to fail, because the stash will not apply with the same files already on disk.
@iiroj
Copy link
Member Author

iiroj commented Apr 5, 2020

@okonet I rebased this on master, since the release job seems to be working. It didn't generate a release because all commits are of ci type.

https://github.com/okonet/lint-staged/runs/561725417?check_suite_focus=true#step:5:59

[8:47:40 AM] [semantic-release] › ℹ  There are no relevant changes, so no new version is released.

@okonet
Copy link
Collaborator

okonet commented Apr 5, 2020

So we merge this one and expect a release? Right?

@iiroj
Copy link
Member Author

iiroj commented Apr 5, 2020

@okonet Yeah, that should be what's happening since these are fix types.

@iiroj iiroj merged commit 2f15336 into master Apr 5, 2020
@iiroj iiroj deleted the fix-untracked-revert branch April 5, 2020 09:03
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2020

🎉 This PR is included in version 10.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iiroj
Copy link
Member Author

iiroj commented Apr 5, 2020

@okonet great success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

error: could not restore untracked files from stash
2 participants