git mozreview only works from root but not subdirectories

RESOLVED FIXED

Status

MozReview
General
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: whimboo, Unassigned)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Whenever I try to run "git mozreview push" from a subdirectory it fails with the following error message:

abort: configuration needed; run `git mozreview configure`

Doing the same from the root dir all is fine.
This is caused by a bug in git 2.8:
http://marc.info/?l=git&m=145973419918524&w=2

The code to get the git directory is confused by that bug:
http://hg.mozilla.org/hgcustom/version-control-tools/file/c03fab1721bd/git/commands/git-mozreview#l61

FWIW, the equivalent code in cinnabar looks like this, and actually works around that bug:
https://github.com/glandium/git-cinnabar/blob/release/cinnabar/git.py#L55
Ah, in fact, the code in cinnabar does *not* work around that particular bug. It works around another older one.
Filed the equivalent cinnabar bug:
https://github.com/glandium/git-cinnabar/issues/70
Created attachment 8754615 [details]
MozReview Request: Bug 1274174 - Work around git 2.8 bug in its output for rev-parse --git-common-dir. r=gps

Review commit: https://reviewboard.mozilla.org/r/54098/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/54098/
Attachment #8754615 - Flags: review?(gps)

Updated

2 years ago
Attachment #8754615 - Flags: review?(gps) → review+

Comment 5

2 years ago
Comment on attachment 8754615 [details]
MozReview Request: Bug 1274174 - Work around git 2.8 bug in its output for rev-parse --git-common-dir. r=gps

https://reviewboard.mozilla.org/r/54098/#review51266
https://hg.mozilla.org/hgcustom/version-control-tools/rev/5b5fbaa85dab
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.