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

Unified Diff: git_cl_hooks.py

Issue 438012: Call git diff --name-status with a relative path.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 1 month 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 | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl_hooks.py
===================================================================
--- git_cl_hooks.py (revision 32839)
+++ git_cl_hooks.py (working copy)
@@ -24,8 +24,11 @@
self.default_presubmit = None
self.may_prompt = None
- root = os.path.abspath(Backquote(['git', 'rev-parse', '--show-cdup']))
+ root = Backquote(['git', 'rev-parse', '--show-cdup'])
if not root:
+ root = "."
+ absroot = os.path.abspath(root)
+ if not root:
raise Exception("Could not get root directory.")
log = Backquote(['git', 'show', '--name-only',
'--pretty=format:%H%n%s%n%n%b'])
@@ -37,7 +40,7 @@
files = scm.GIT.CaptureStatus([root], upstream_branch)
issue = Backquote(['git', 'cl', 'status', '--field=id'])
patchset = None
- self.change = presubmit_support.GitChange(name, description, root, files,
+ self.change = presubmit_support.GitChange(name, description, absroot, files,
issue, patchset)
« no previous file with comments | « no previous file | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698