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
Collaborator

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
Collaborator 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.

@iiroj
Copy link
Collaborator 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
Owner

okonet commented Apr 3, 2020

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

iiroj added 2 commits 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.
@iiroj iiroj force-pushed the fix-untracked-revert branch from 956ae3c to 76cf26b Apr 5, 2020
@iiroj
Copy link
Collaborator 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
Owner

okonet commented Apr 5, 2020

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

@okonet
okonet approved these changes Apr 5, 2020
@iiroj
Copy link
Collaborator 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
7 checks passed
7 checks passed
Node.js v10 on ubuntu-latest
Details
Node.js v12 on ubuntu-latest
Details
Node.js v13 on ubuntu-latest
Details
Codecov
Details
codecov/patch 100.00% of diff hit (target 100.00%)
Details
codecov/project 100.00% (+0.00%) compared to 78a677a
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@iiroj iiroj deleted the fix-untracked-revert branch Apr 5, 2020
@github-actions
Copy link

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 📦🚀

@github-actions github-actions bot added the released label Apr 5, 2020
@iiroj
Copy link
Collaborator 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.