conventional-changelog-archived-repos / validate-commit-msg

DEPRECATED. Use https://github.com/marionebl/commitlint instead. githook to validate commit messages are up to standard
http://conventionalcommits.org/
MIT License
556 stars 101 forks source link

feat: allow fixup! and squash! #19

Closed cmalard closed 8 years ago

cmalard commented 8 years ago

fixup! and squash! are part of Git, commits tagged with them are not intended to be merged :

$ (dev) git commit -m "Feature A is done"
[dev fb2f677] Feature A is done

$ (dev) git commit -m "Feature B is done"
[dev 733e2ff] Feature B is done

# you've removed a pdb : shameful commit
$ (dev) git commit --fixup fb2f677
[dev c5069d5] fixup! Feature A is done
$ (dev) git log --oneline
c5069d5 fixup! Feature A is done
733e2ff Feature B is done
fb2f677 Feature A is done
ac5db87 Previous commit
$ (dev) git rebase -i --autosquash ac5db87
ff4de2a Feature B is done
5478cee Feature A is done
ac5db87 Previous commit

If we do not want to allow fixup/squash (this is not in the Angular commit spec, after all), the way to use this feature is to ignore validation on the squash/fixup commit (git commit --fixup --no-verify). I am not in favor to make this a habit, hence the PR :-)

codecov-io commented 8 years ago

Current coverage is 100.00%

Merging #19 into master will not affect coverage as of 681df95

@@            master     #19   diff @@
======================================
  Files            1       1       
  Stmts           53      54     +1
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit             53      54     +1
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of 681df95

Powered by Codecov. Updated on successful CI builds.

kentcdodds commented 8 years ago

Awesome. Thanks!