Automatically remove git-mozreview commit-msg-hook from .git/hooks/commit-msg

RESOLVED FIXED

Status

enhancement
RESOLVED FIXED
11 months ago
8 months ago

People

(Reporter: robwu, Assigned: sheehan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

11 months ago
I use git-cinnabar and am migrating from mozreview to the Phabricator-based workflow.

I am manually removing the git-mozreview hook from .git/hooks/commit-msg [1], but I think that this should be done automatically to avoid unnecessary "MozReview-Commit-ID" line in commit messages from those who aren't aware of the commit hook.

Here are several examples of commit messages that contain both MozReview-Commit-ID and a Phabricator reference: https://hg.mozilla.org/mozilla-central/log/a89f17d30427


[1] https://hg.mozilla.org/hgcustom/version-control-tools/file/8f356a8585f1/git/hooks/commit-msg-mozreview

Comment 1

10 months ago
Discussed on IRC.  mach vcs-setup seems like a good way to strip this out.
Component: Integration: Git → Bootstrap Configuration
Product: MozReview → Firefox Build System
Would you mind handling this at some point?
Assignee: nobody → sheehan
Assignee

Comment 3

8 months ago
During the MozReview days, users of git-cinnabar would install a
commit message hook to include `MozReview-Commit-Id` in their
commit messages. MozReview has seen been retired, yet there
are still a few users with the hook in their configs who now
have both a MozReview commit ID and a Phabricator Differential
link in their commits. This commit makes `mach vcs-setup` (and
`mach bootstrap`, since the former is called during the latter)
remove the commit hook on git checkouts of a Firefox repo.

Comment 4

8 months ago
Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03d2c2019682
remove git-mozreview commit message hook during `mach vcs-setup` r=mcote,gps
Assignee

Updated

8 months ago
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Depends on: 1503817
You need to log in before you can comment on or make changes to this bug.