Commit graph

6 commits

Author SHA1 Message Date
Achill Gilgenast
32e9ca423e
githooks/pre-commit: remove file size check
This still comes from the aports hook, where we want to avoid too large patches,
but in pmaports we have big kernel config files that might exceed the
configured 256 kiB limit.

Currently the following files exceed that limit and used git commit
--no-verify to overcome the error (or didn't configure git hooks):

	260K	./device/community/linux-postmarketos-qcom-laptop/config-postmarketos-qcom-laptop.aarch64
	268K	./main/postmarketos-bootsplash/OpenSans-Regular.svg
	336K	./device/downstream/linux-amazon-checkers/0003-Add-missing-kconfig-files.patch
	376K	./device/downstream/linux-amazon-austin/silence-power-logspam.patch

Alternatively we can increase the file limit, but i'm not sure what that
solves.

In future for Alpine, I want to move the check to abuild's internal
linting, which makes it visible for all APKBUILDs, consistent with
other of abuild's linters and also shows up on CI.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7603>
2025-12-22 23:53:09 +00:00
Pablo Correa Gómez
22e782faae
githooks: add docs prefix
In the process, update the README to point to how to add the githooks
folder. I had to go to aports to find the command.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7077>
2025-09-25 19:55:27 +00:00
Oliver Smith
e6bda25a0b
githooks/prepare-commit-msg: add systemd prefixes
Extend the hook to automatically make useful titles for packages in
systemd directories. We had two styles for modifying the systemd package
itself, either "systemd/systemd:" or "systemd:". Pick the shorter one.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
2025-03-23 14:28:11 +01:00
Oliver Smith
d203541889
githooks/prepare-commit-msg: refactor case...esac
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
2025-03-23 14:28:07 +01:00
Caleb Connolly
1c3296a63a
githooks: ignore unstaged hunks of APKBUILD (MR 5807)
It's possible that additional sources have been made to an APKBUILD
which are unstaged, but if the hunks adding those sources haven't been
staged either then it doesn't make sense to fail on this.

Use git show to get only the staged hunks for the APKBUILD.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
2024-12-04 16:17:36 +01:00
Pablo Correa Gómez
048a18ad71
Add githooks from alpine (MR 4008)
Get the githooks from alpine, with the following changes:

* Make it possible to parse the additionally nested "device" folder
  with the exceptions mentioned in our COMMITSTYLE
* Ignore "device/*" as a possible prefix for the commit
* Replace abuild references with pmbootstrap

Relates #2055
[ci:skip-build]: already built successfully in CI
2023-04-12 16:42:45 +02:00