Closed Bug 1246820 Opened 10 years ago Closed 10 years ago

Can't commit with Xcode once commit-msg hook is installed

Categories

(MozReview Graveyard :: General, defect)

Unspecified
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jya, Assigned: gps)

References

Details

Attachments

(2 files)

when running git mozreview configure, a commit-msg hook is added. " #!/bin/sh # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # commit-msg hook for MozReview configured repositories that inserts a # random/unique identifier in the commit message to help identify commits # across rewriting. git mozreview commit-msg-hook "$@" exit $? " This works in a terminal after modifying the PATH to include the location where git-mozreview is located. Unfortunately, when using XCode's internal git, you can't configure the global path. So attempting to commit with xcode will now fail with the error: "git: 'mozreview' is not a git command. See 'git --help'." changing the commit-msg with something like: $HOME/.mozbuild/version-control-tools/git/commands/git-mozreview commit-msg-hook "$@" did go around the issue. I don't know if there's a way to configure git to search a particular location for plugins, but requiring the PATH environment variable to be modified won't work for xcode users.
No longer blocks: 1140576
Depends on: 1153053
Rewriting the hook to include the full path to git-mozreview makes sense to me.
Assignee: nobody → gps
Status: NEW → ASSIGNED
This is in preparation for rewriting the hook as part of installing. We can't modify content if using symlinks. Review commit: https://reviewboard.mozilla.org/r/34083/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/34083/
Attachment #8717245 - Flags: review?(dminor)
Comment on attachment 8717245 [details] MozReview Request: git-mozreview: do not symlink hook; r?dminor https://reviewboard.mozilla.org/r/34083/#review30849 lgtm
Attachment #8717245 - Flags: review?(dminor) → review+
Attachment #8717246 - Flags: review?(dminor) → review+
Comment on attachment 8717246 [details] MozReview Request: git-mozreview: put full path to git-mozreview in hook (bug 1246820); r?dminor https://reviewboard.mozilla.org/r/34085/#review30851 lgtm
Autolanded.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Will running git mozreview configure automatically fix an existing install?
(In reply to Jean-Yves Avenard [:jya] from comment #7) > Will running git mozreview configure automatically fix an existing install? Yes.
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: