Commit 512f1ef7 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Pass relative paths to GIT.CaptureStatus

BUG=79953
TEST=see bug

Review URL: http://codereview.chromium.org/6883085

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82290 0039d316-1c4b-4281-b951-d872f2087c98
parent 736aefea
......@@ -513,12 +513,13 @@ or verify this branch is set up to track another (via the --track argument to
def RunHook(self, committing, upstream_branch, tbr, may_prompt, verbose):
"""Calls sys.exit() if the hook fails; returns a HookResults otherwise."""
root = RunCommand(['git', 'rev-parse', '--show-cdup']).strip()
absroot = os.path.abspath(root or '.')
root = RunCommand(['git', 'rev-parse', '--show-cdup']).strip() or '.'
absroot = os.path.abspath(root)
# We use the sha1 of HEAD as a name of this change.
name = RunCommand(['git', 'rev-parse', 'HEAD']).strip()
files = scm.GIT.CaptureStatus([absroot], upstream_branch)
# Need to pass a relative path for msysgit.
files = scm.GIT.CaptureStatus([root], upstream_branch)
issue = ConvertToInteger(self.GetIssue())
patchset = ConvertToInteger(self.GetPatchset())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment