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

Whitelist component for fixup commits #28

Closed
jzaefferer opened this issue Oct 10, 2014 · 2 comments · Fixed by #29
Closed

Whitelist component for fixup commits #28

jzaefferer opened this issue Oct 10, 2014 · 2 comments · Fixed by #29

Comments

@jzaefferer
Copy link
Owner

#26 suggests allowing "fixup!" as a prefix to whitelist, but that's very specifc to the --fixup flag and will reuse the existing commit message. In our current PR workflows, we use something like "[fix]: description of the fixup".

Could also whitelist /\[[^\]]+\]:/ (anything in square brackets), along with "fixup!" and "squash!".

@jzaefferer
Copy link
Owner Author

@mislav any thoughts on this? Am I missing something?

@mislav
Copy link

mislav commented Oct 10, 2014

I'm not sure what are you hinting at with square brackets, but the importance of whitelisting fixup! and squash! prefixes is:

  1. They're added by git and are taken as directives to the git rebase autosquash process
  2. These commits are short-lived. They're intended to be merged with other commits and never shared upstream
  3. It doesn't make sense to verify the commit message of these commits since in the case of fixup!, its commit message will get discarded in the rebase process, and as for squash!: its message will get appended to the message of the original commit during rebase and re-verified again as a whole by the commit-msg git hook.

I have no opinion on the square brackets notation, as I think it represent completely different and unrelated use cases.

jzaefferer added a commit that referenced this issue Oct 17, 2014
See the readme updats for usage details.

Fixes #26
Fixes #28
jzaefferer added a commit that referenced this issue Oct 21, 2014
Both fixup! and squash! are git-specific. Any component in square brackets
like [Tmp] or [fix] is also considered valid, to be manually squashed later.

Fixes #26
Fixes #28
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 a pull request may close this issue.

2 participants