Auto setup gerrit commit-msg hook with nix develop
#273
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#273
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Setting up the gerrit
commit-msg
hook seems kind of annoying and a barrier for new contributors. Maybe we could automate it with in-repo tooling offering to set it up for you in shellHook?I put together a tiny patch that will download it if it isn't present.
I'm new to using Gerrit but I think that's all that's needed? I built this patchset with the change and seemed to go fine.
Huh, the "closes" tag in
268a411ed1
didn't close this issue. Might be a weird permissions thing? Anyway thank you @arcuru!fyi this is broken if first run from a worktree. i know how to fix it though, will send a patch. thanks so much for writing this!
~~ah, no, it looks like you did the gerrit thing wrong and no change was created. you want to push like
git push origin HEAD:refs/for/main
rather thangit push origin refs/sb/you/somebranch
. ~~ wait no https://gerrit.lix.systems/c/lix/+/1054 exists, what. I'll pick up the change, fixup the bug I found, and push it with the workaround%base=refs/heads/main
.I pushed it to
refs/sb/arcuru/commit-msg
first as I was having some issues with Gerrit authentication. That may have messed up some references.oh, i see. Yeah that caused it to get replicated to forgejo which lightly confused qyriad since it would not close the issue unless it was on
main
. This workflow is fine, it just has some annoyance if you later want to push the changes for review as gerrit gets confused that it's already on a branch and you have to pass%base=
to make it happy (https://gerrit-review.googlesource.com/Documentation/user-upload.html#base).Oops, so this should probably stay open in https://gerrit.lix.systems/c/lix/+/1054/ is actually merged, sorry 😅