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

Fails on first time start with git rev-list error #277

Closed
astur opened this issue Jun 6, 2018 · 16 comments
Closed

Fails on first time start with git rev-list error #277

astur opened this issue Jun 6, 2018 · 16 comments
Labels
bug 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@astur
Copy link

astur commented Jun 6, 2018

Issuehunt badges

When run np (v3.0.4) first time on some repo it fails with this output:

Publish a new version of arrgv (current: 0.0.6)

✖ Command failed: git rev-list --tags --max-count=1
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
  limiting output:
    --max-count=<n>
    --max-age=<epoch>
...
... and so on

Then if run 'np major' (or other command) it works as usual.

On repos, where np was successfully used before, this problem do not appears.

Maybe it is bug.

itaisteinherz earned $40.00 by resolving this issue!

@ziyaddin
Copy link

ziyaddin commented Aug 4, 2018

I guess this error occurs due to absence of commits in git commit history.

@astur
Copy link
Author

astur commented Aug 5, 2018

@ziyaddin unfortunately this error occurs even if there is few commits in git commit history. But this error does not occurs if there is at least one tag.

@0xjjpa
Copy link

0xjjpa commented Aug 30, 2018

I can confirm I was faced with the same issue when trying to run np on its own. Providing an argument like np 0.1.0 seems to have solved the issue in my case.

@lachenmayer
Copy link

Hey folks, also just bumped into this error in a repo in which I have never used np before.

I tried to just run npx np from a repo that currently has no tags, and which I've manually published the repo to npm once. Can't think of any other discerning features of this repo.

I had a look at the error message that git provides & it seems the <commit-id> argument is missing.

✖ Command failed: git rev-list --tags --max-count=1
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]

(...confirmed by running git rev-list --tags --max-count=1 manually)

An obvious commit id would be HEAD, as in git rev-list --tags --max-count=1 HEAD, which does give me some kind of hash - I don't know if that is the correct behavior, but I hope that's helpful for anyone who might want to fix this :)

Thanks to Sindre & the squad for this awesome module ✌️

@schuchard
Copy link

@jjperezaguinaga solution works for me

@IssueHuntBot
Copy link

@issuehuntfest has funded $40.00 to this issue. See it on IssueHunt

@itaisteinherz
Copy link
Collaborator

Is this still an issue? It should have been fixed in #322 (@sindresorhus I didn't submit the PR to IssueHunt for this issue, but in case it fixed it I can do so).

@astur
Copy link
Author

astur commented Jan 21, 2019

@itaisteinherz, it still not working for me. 3.1.0.

@itaisteinherz
Copy link
Collaborator

@astur Can you try again using the latest version from GitHub (i.e. npm install --global sindresorhus/np)?

@astur
Copy link
Author

astur commented Jan 22, 2019

@itaisteinherz, it works great with latest version from GitHub.

@itaisteinherz
Copy link
Collaborator

itaisteinherz commented Jan 22, 2019

@astur Great 👍🏻 @sindresorhus I'm going to submit #322 to IssueHunt as a PR which fixes this since it seems to be the case here. Also, I think this can be closed now.

@IssueHuntBot
Copy link

@itaisteinherz has submitted a pull request. See it on IssueHunt

@astur
Copy link
Author

astur commented Jan 22, 2019

@itaisteinherz what about wait for fixed npm package before close this issue?

@itaisteinherz
Copy link
Collaborator

itaisteinherz commented Jan 23, 2019

@astur A new version with the fix included has already been released - v4.0.0.

@astur
Copy link
Author

astur commented Jan 23, 2019

@itaisteinherz thanks

@astur astur closed this as completed Jan 23, 2019
@IssueHuntBot
Copy link

@sindresorhus has rewarded $36.00 to @itaisteinherz. See it on IssueHunt

  • 💰 Total deposit: $40.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $4.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

8 participants