Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fixup messages should not trigger a gitlint violation #33

Closed
nud opened this issue Jun 7, 2017 · 2 comments · Fixed by #43
Closed

fixup messages should not trigger a gitlint violation #33

nud opened this issue Jun 7, 2017 · 2 comments · Fixed by #43
Labels
bug User-facing bugs

Comments

@nud
Copy link

nud commented Jun 7, 2017

When using git commit --fixup=<commitid>, some gitlint violations are triggered:

$ git commit -a --fixup=HEAD
gitlint: checking commit message...
3: B6 Body message is missing
-----------------------------------------------
gitlint: Your commit message contains the above violations.
Continue with commit anyways (this keeps the current commit message)? [y(es)/n(no)/e(dit)] 

Probably the B6 check should ignore commits whose title starts with fixup! ?

@jorisroovers
Copy link
Owner

Ok, I have never used --fixup or --squash before in combination with commit, I always take care of that manually during rebasing. TIL :)

For reference for others, here's some info: https://robots.thoughtbot.com/autosquashing-git-commits

I agree this is valid. Will be fixed, but as often, it might take me a while to get to this. Happy to accept PRs :)

Thanks for submitting!

@jorisroovers jorisroovers added the bug User-facing bugs label Jun 7, 2017
jorisroovers pushed a commit that referenced this issue Jul 24, 2017
This code is related to #33.

- Added config code
- Added git parsing code

TODO: End-to-end unit and integration tests
jorisroovers pushed a commit that referenced this issue Dec 1, 2017
This code is related to #33.

- Added config code
- Added git parsing code

TODO: End-to-end unit and integration tests
jorisroovers pushed a commit that referenced this issue Dec 1, 2017
This code is related to #33.

- Added config code
- Added git parsing code

TODO: End-to-end unit and integration tests
jorisroovers pushed a commit that referenced this issue Dec 1, 2017
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes #33.
jorisroovers pushed a commit that referenced this issue Dec 1, 2017
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes #33.
jorisroovers pushed a commit that referenced this issue Dec 1, 2017
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes #33.
jorisroovers pushed a commit that referenced this issue Dec 3, 2017
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes #33.
jorisroovers added a commit that referenced this issue Dec 3, 2017
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes #33.
jorisroovers pushed a commit that referenced this issue Dec 3, 2017
The 0.9.0 release adds a new default author-valid-email rule, important
bugfixes and special case handling. Special thanks to joshholl, ron8mcr,
omarkohl, domo141, nud and AlexMooney for their contributions.

- New Rule: author-valid-email enforces a valid author email address.
  Details can be found in the Rules section of the documentation.
- Breaking change**: The --commits commandline flag now strictly follows
  the refspec format as interpreted by the git rev-list <refspec> command.
  This means that linting a single commit using gitlint --commits <SHA> won't
  work anymore. Instead, for single commits, users now need to specificy gitlint
  --commits <SHA>^...<SHA>.
  On the upside, this change also means that gitlint will now understand all
  refspec formatters, including gitlint --commits HEAD to lint all commits
  in the repository. This fixes #23.
- Breaking change**: Gitlint now always falls back on trying to read a git
  message from a local git repository, only reading a commit message from
  STDIN if one is passed. Before, gitlint only read from the local git
  repository when a TTY was present. This is likely the expected and desired
  behavior for anyone running gitlint in a CI environment.
  This fixes #40 and #42.
- Behavior Change**: Gitlint will now by default ignore squash and fixup
  commits (fix for #33).
- Support for custom comment characters (#34).
- Support for 'git commit --cleanup=scissors' (#34).
- Bugfix: #37: Prevent Commas in text fields from breaking git log printing
- Debug output improvements

Full Release details in CHANGELOG.md.
@nud
Copy link
Author

nud commented Dec 15, 2017

Thanks a lot!

RykHawthorn pushed a commit to RykHawthorn/gitlint that referenced this issue Jan 12, 2018
- Config code
- Git parsing code
- Linting skips
- Unit and Integration Tests
- Docs

This fixes jorisroovers#33.
RykHawthorn pushed a commit to RykHawthorn/gitlint that referenced this issue Jan 12, 2018
The 0.9.0 release adds a new default author-valid-email rule, important
bugfixes and special case handling. Special thanks to joshholl, ron8mcr,
omarkohl, domo141, nud and AlexMooney for their contributions.

- New Rule: author-valid-email enforces a valid author email address.
  Details can be found in the Rules section of the documentation.
- Breaking change**: The --commits commandline flag now strictly follows
  the refspec format as interpreted by the git rev-list <refspec> command.
  This means that linting a single commit using gitlint --commits <SHA> won't
  work anymore. Instead, for single commits, users now need to specificy gitlint
  --commits <SHA>^...<SHA>.
  On the upside, this change also means that gitlint will now understand all
  refspec formatters, including gitlint --commits HEAD to lint all commits
  in the repository. This fixes jorisroovers#23.
- Breaking change**: Gitlint now always falls back on trying to read a git
  message from a local git repository, only reading a commit message from
  STDIN if one is passed. Before, gitlint only read from the local git
  repository when a TTY was present. This is likely the expected and desired
  behavior for anyone running gitlint in a CI environment.
  This fixes jorisroovers#40 and jorisroovers#42.
- Behavior Change**: Gitlint will now by default ignore squash and fixup
  commits (fix for jorisroovers#33).
- Support for custom comment characters (jorisroovers#34).
- Support for 'git commit --cleanup=scissors' (jorisroovers#34).
- Bugfix: jorisroovers#37: Prevent Commas in text fields from breaking git log printing
- Debug output improvements

Full Release details in CHANGELOG.md.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug User-facing bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants