Skip to content

Add no verify for commit #426

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

Closed
wants to merge 21 commits into from

Conversation

AgoraSecurity
Copy link
Contributor

@AgoraSecurity AgoraSecurity commented Nov 7, 2019

In git commit, add:
-n, --no-verify
This option bypasses the pre-commit and commit-msg hooks. See also githooks(5).

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Add option to bypasses the pre-commit and commit-msg hooks

@AgoraSecurity AgoraSecurity changed the title Add no verify for commit [WIP] Add no verify for commit Nov 7, 2019
@AgoraSecurity AgoraSecurity changed the title [WIP] Add no verify for commit Add no verify for commit Nov 10, 2019
@AgoraSecurity
Copy link
Contributor Author

@perlun and @tarcinil -- this PR is ready for review.

@stale
Copy link

stale bot commented Jan 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 11, 2020
@AgoraSecurity
Copy link
Contributor Author

@perlun and @tarcinil -- this PR is ready for review.

@stale stale bot removed the wontfix label Jan 11, 2020
@jcouball
Copy link
Member

This change looks good, but needs unit tests and documentation updates.

@AgoraSecurity
Copy link
Contributor Author

@jcouball Sure, I'll work in unit tests and documentation updates.

By the way, if you could point me to files (example of desired updates, etc.) it will really help me.

Thanks!

@jcouball
Copy link
Member

Documentation

Our CONTRIBUTING.md says that yard docs should be added / updated on all methods though I can see that hasn't been done consistently.

I would expect the yard doc for Lib::commit to be added. A good example can be found for Lib::diff_as_hash:
https://github.com/ruby-git/ruby-git/blob/master/lib/git/lib.rb#L981-L985

I'd say that documenting this option in the README.md is optional.

Unit Testing

Unit tests can be found here:
https://github.com/ruby-git/ruby-git/tree/master/tests/units

and are run with the command:
bundle exec rake test

I don't see that tests already exist for commit which makes your job harder. Feel free to take a look at other existing tests and see if you can figure it out. I'll dig in deeper to give you more advice, but it will take me some time to get to that.

tarcinil and others added 19 commits February 21, 2020 13:53
…by-git#382)

* removing un-needed elements from travis

Signed-off-by: Vern Burton <me@vernburton.com>

* removing cext which is not supported in travis

Signed-off-by: Vern Burton <me@vernburton.com>

* using double quotes

Signed-off-by: Vern Burton <me@vernburton.com>

* adding matrix form

Signed-off-by: Vern Burton <me@vernburton.com>

* using a different matrix

Signed-off-by: Vern Burton <me@vernburton.com>

* install bundler in jruby

Signed-off-by: Vern Burton <me@vernburton.com>

* removing .jrubyrc as C extension support was deprecated in 1.7 and newer versions are missing much of the support (Source: https://github.com/jruby/jruby-cext).
adding jruby back to the standard matrix

Signed-off-by: Vern Burton <me@vernburton.com>
Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Stephen Paul Weber <singpolyma@singpolyma.net>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Evgenii Pecherkin <evgenii@toptal.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
By adding a new environment variable called `GIT_PATH` we can allow
consumers, that is, a user of a gem which itself uses the git gem,
to customize the location of the git binary.

Example: Having a gem called `git-tool` that uses this gem `git`, if I,
as a user wants to modify the git bin location, I could do:
```
GIT_PATH=/foo/bin git-tool bar
```

Signed-off-by: Salim Afiune <afiune@chef.io>Signed-off-by: Agora Security <github@agora-security.com>
In git commit, add:
       -n, --no-verify
           This option bypasses the pre-commit and commit-msg hooks. See also githooks(5).

Signed-off-by: Agora@Ubuntu-dev <filter@agora-security.com>
Signed-off-by: Agora Security <github@agora-security.com>
…ing does not raise an exception (ruby-git#405)

Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Per Lundberg <perlun@gmail.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the
    best of my knowledge, is covered under an appropriate open
    source license and I have the right under that license to
    submit that work with modifications, whether created in whole
    or in part by me, under the same open source license (unless
    I am permitted to submit under a different license), as
    Indicated in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including
    all personal information I submit with it, including my
    sign-off) is maintained indefinitely and may be redistributed
    consistent with this project or the open source license(s)
    involved.

Signed-off-by: cyclotron3k <aidan.samuel@gmail.com>Signed-off-by: Agora Security <github@agora-security.com>
This change fixes the warning:

Users/USER/rvm/gems/ruby-2.7.0-rc1@ruby2.7-no-rails/gems/git-1.5.0/lib/git/branch.rb:40:
warning: parentheses after method name is interpreted as an argument list, not a decomposed argument

This fix was originally proposed by @jasnow

Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
The intent was to structure the instructions better without making
actual changes to the contribution rules.

Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
Add instructions for releasing the git gem
Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: James Couball <jcouball@yahoo.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Yuta Harima <yuu725@gmail.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Yuta Harima <yuu725@gmail.com>Signed-off-by: Agora Security <github@agora-security.com>
…uby-git#447)

Signed-off-by: a4z <harald.achitz@gmail.com>Signed-off-by: Agora Security <github@agora-security.com>
…es (ruby-git#427)

Signed-off-by: Marcel Hoyer <m.hoyer@cid.com>Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Agora Security <github@agora-security.com>
Signed-off-by: Agora Security <github@agora-security.com>
@AgoraSecurity
Copy link
Contributor Author

Closed in favor of #454

@AgoraSecurity AgoraSecurity deleted the commit_ignore branch February 21, 2020 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants