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
Git "no unpulled changes" not working? #390
Comments
For me the check seems to fail as expected when there are remote commits that don't exist locally. Can you upload a minimal reproducible example / steps to reproduce? |
Expected behavior: The Git check to fail as there are remote changes not pulled Actual behavior: The Git check passes |
@ntwb Following the steps above did not lead to any unexpected behavior on my end 😕 |
@ntwb Can you try the latest release https://github.com/sindresorhus/np/releases/tag/v5.0.0 ? |
@ntwb Any chance you could take a look at our comments above? 🙃 |
Closing due to age and lack of response. Probably still tracked in #421 |
Description
I've just been testing this package as an alternative to the current publish tool I've been using.
I wanted to test some of the features this tool provides, one of those is:
My test of "the working directory is clean" worked perfectly, though the test of "no unpulled changes" failed.
Steps to reproduce
Here is the output of what I ran:
I hit
CTRL-C
at the "Installing dependencies using npm" step as I knew I had upstream changes that had not yet been pulled into my local checkout.Looking at https://github.com/sindresorhus/np/blob/master/source/git-tasks.js#L16-L17 I expect the "Check remote history" should have been run, and failed at the
Git
step/stage of the above workflow but did not.As you can see after it ran I ran
git status
followed bygit pull
to pull in said remote changes that had not yet been pulled.Expected behavior
I expected the checks to fail when there are upstream changes not yet pulled down
Environment
np - 4.0.2
Node.js - 10.15.0
npm - 6.9.0
Git - 2.21.0
OS - macOS 10.14.4
The text was updated successfully, but these errors were encountered: