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

Unified Diff: gclient_scm.py

Issue 14230012: Add placeholder git hooks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix THIS_FILE_PATH Created 7 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: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 3762f77f1fe7e792a722229536ba1a129f704f14..71fecd09f688dc3d699055ea503970ea3bb6eeed 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -16,6 +16,9 @@ import scm
import subprocess2
+THIS_FILE_PATH = os.path.abspath(__file__)
+
+
class DiffFiltererWrapper(object):
"""Simple base class which tracks which file is being diffed and
replaces instances of its file name in the original and
@@ -653,8 +656,9 @@ class GitWrapper(SCMWrapper):
# git clone doesn't seem to insert a newline properly before printing
# to stdout
print('')
-
- clone_cmd = ['clone', '--progress']
+ template_path = os.path.join(
+ os.path.dirname(THIS_FILE_PATH), 'git-templates')
+ clone_cmd = ['clone', '--progress', '--template=%s' % template_path]
if revision.startswith('refs/heads/'):
clone_cmd.extend(['-b', revision.replace('refs/heads/', '')])
detach_head = False
« 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