Commit Graph

12 Commits

Author SHA1 Message Date
Martin Mathieson 4981b10d0b Add a commit-msg that may be installed to verify commit msg line length. 2021-03-23 09:09:19 +00:00
Gerald Combs 50550708cc Add merge request jobs to GitLab CI and migrate commit validation.
Copy the Buildbot petri dish builder steps to corresponding GitLab CI
jobs. Update validate-commit.py to look for old "Bug:" and "Ping-Bug:"
references and have it call `git stripspace` directly. tools/commit-msg
was specific to Gerrit, so remove it.

Change-Id: Icbc54709052f44c941db9ad6a5dcf596292782a2
2020-08-23 17:46:18 -07:00
Tomasz Moń 8a13504258 commit-msg: Place Ping-Bug before Change-Id
Change-Id: I8fa8609e372304370ab3bcee1c79feb883e3eff5
Reviewed-on: https://code.wireshark.org/review/33086
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-05 17:38:49 +00:00
Peter Wu a4dad7cb6d commit-msg: accept commit messages with backslashes
Dash (/bin/sh on Ubuntu) treats backslashes specially in an echo
command. This could fail the validate-commit.py script when '\r' or '\n'
occur anywhere in a commit message.

Change-Id: Icec2c1e8ad1b365b4326ecc6ba9667ac64866fdd
Reviewed-on: https://code.wireshark.org/review/31368
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-04 14:45:03 +00:00
Peter Wu e04fdf59bf tools: exclude Revert prefixes from 80 chars limit
When commits are reverted, the subject line might exceed 80 chars.
Adjust the pre-commit hook to gracefully handle a higher length and let
validate-commit.py (as used by Petri-Dish) validate the original subject
length.

Change-Id: I54f2a99f95b7fca2f683aa1e98f0349dcf4ed1b7
Reviewed-on: https://code.wireshark.org/review/31120
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-20 05:43:24 +00:00
Peter Wu 7c6ca703ef commit-msg: fixup whitespace and blank lines around "Bug" tags
About 90 commits so far have a newline after the "Bug" tag. That breaks
the issue tracker integration and tools such as git-interpret-trailers,
so ensure that such blank lines are removed.

Change-Id: Ib73e0ab1bbf99c8c200e74a03facc5d359c82436
Reviewed-on: https://code.wireshark.org/review/28828
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-01 14:00:48 +00:00
Peter Wu 19b61b07ba commit-msg: quote the filename, fix printed message
Quote the filename in case it contains spaces or other special chars.

Change-Id: I5ff901de0839551c06bc73b8bef631b64aff5199
Fixes: v2.9.0rc0-1078-gc20432285a ("git hooks: prevent first commit message line to exceed 80 chars.")
Reviewed-on: https://code.wireshark.org/review/28827
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-07-26 21:12:49 +00:00
Balint Reczey aff4900a6c Do not add Change-Id on packaging branches
Change-Id: I2a40d4d005dfab6b887833150cb6556e08622a1d
Reviewed-on: https://code.wireshark.org/review/28517
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-28 22:39:35 +00:00
Dario Lombardo c20432285a git hooks: prevent first commit message line to exceed 80 chars.
Change-Id: Ic3b2d93e7da7cdf671f97977b4d0501ba4b84122
Reviewed-on: https://code.wireshark.org/review/28431
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-27 06:08:00 +00:00
Dario Lombardo fdd426e410 spdx: more licenses converted.
Change-Id: Ia1650bc02511f7bd47fb90be91b623177f05bcbd
Reviewed-on: https://code.wireshark.org/review/26337
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:48:20 +00:00
Gerald Combs 2c20ffa871 Update tools/commit-msg.
Update tools/commit-msg to version 2.12.7 by running

    curl -Lo tools/commit-msg https://code.wireshark.org/review/tools/hooks/commit-msg

Change-Id: Ie70a8e869968b5237c9e21c0624f1f8af696d83b
Reviewed-on: https://code.wireshark.org/review/19290
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-12-15 19:46:37 +00:00
Michał Orynicz 0f0c079226 Add commit-msg hook to tools to spare searching for it
commit-msg script adds change id at end of commit messages.
As this script is needed for Gerrit review system to work 
and every wireshark developer will need to download it from 
somewhere, it will be better if it is downloaded with Wireshark
sources and ready to copy to .git/hooks

Copied from AOSP Gerrit.

Change-Id: Ib3705abfedd2869462eef57690a2f430037f9cc1
Reviewed-on: https://code.wireshark.org/review/1008
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-08 17:23:14 +00:00