-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Suppress log by filtering remote refs #1804
Suppress log by filtering remote refs #1804
Conversation
Thanks for the contribution @aeroastro - I have a question:
First impression is that it looks OK, since it's only a repo-check and doesn't need to enumerate all objects, we could definitely pull fewer tags/heads/etc, and still have equal functionality. |
Thank you for your time to look into my patch and comment.
This change support Git with version later than or equal to 0.99.4. The |
Thanks, great news. If you'd like to be credited in the |
@aeroastro Can you add a CHANGELOG entry? Then we can merge this PR. Thanks! |
4287f5a
to
fafe22e
Compare
Sorry for the late response and thank you for the review. |
Unfortunately the only way to check Cucumber features is to run them locally, since we can't do it in Travis. Assuming you have a working Vagrant setup, you can run the Cucumber features using:
|
fafe22e
to
e9fd89c
Compare
I removed the assertion on "And references in the remote repo are listed". Then, by executing |
Excellent work. Thanks for the PR! 🙇 |
Thank you! 🐱 |
Summary
This patch can suppress long logs generated by
git ls-remote
, especially for repositories with many tags and branches.Because the primary objective of
git ls-remote
used is to check the access rights toremote_url
, we can omit a number of remote refs by specifying HEAD as<refs>
at the end of the command.Although the default exit code of
git ls-remote
is always 0 regardless of matched refs, I think specifyingHEAD
as<refs>
is fairly simple option for Git users.Short checklist
bundle exec rubocop -a
to fix linter issues?Other Information
Ref. https://git-scm.com/docs/git-ls-remote.html