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)
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.
| Assignee | ||
Updated•10 years ago
|
| Assignee | ||
Comment 1•10 years ago
|
||
Rewriting the hook to include the full path to git-mozreview makes sense to me.
Assignee: nobody → gps
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•10 years ago
|
||
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)
| Assignee | ||
Comment 3•10 years ago
|
||
See the inline comment for the reason why.
Review commit: https://reviewboard.mozilla.org/r/34085/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/34085/
Attachment #8717246 -
Flags: review?(dminor)
Comment 4•10 years ago
|
||
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+
Updated•10 years ago
|
Attachment #8717246 -
Flags: review?(dminor) → review+
Comment 5•10 years ago
|
||
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
| Assignee | ||
Comment 6•10 years ago
|
||
Autolanded.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 7•10 years ago
|
||
Will running git mozreview configure automatically fix an existing install?
| Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #7)
> Will running git mozreview configure automatically fix an existing install?
Yes.
Updated•10 years ago
|
Product: Developer Services → MozReview
You need to log in
before you can comment on or make changes to this bug.
Description
•