Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2018)

Unified Diff: git_cl.py

Issue 6883085: Pass relative paths to GIT.CaptureStatus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: comment Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 351aba58e81fa73927f9ef4811223106b6281ea5..582a4aaecb408ea598eb1354f14f92753d2bbc30 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -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())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698