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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py

Issue 1918993003: Git patches created by webkitpy now always have filename prefixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
index ffa7795fb580d2548f60d7f160d4e227fe79c21a..38e5a77633d647bc3eba51d369b2612a84307223 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
@@ -196,6 +196,17 @@ class GitTest(SCMTestBase):
patch = scm.create_patch()
self.assertNotRegexpMatches(patch, r'Subversion Revision:')
+ def test_patches_have_filenames_with_prefixes(self):
+ self._write_text_file('test_file_commit1', 'contents')
+ self._run(['git', 'add', 'test_file_commit1'])
+ scm = self.tracking_scm
+ scm.commit_locally_with_message('message')
+
+ # Even if diff.noprefix is enabled, create_patch() produces diffs with prefixes.
+ self._run(['git', 'config', 'diff.noprefix', 'true'])
+ patch = scm.create_patch()
+ self.assertRegexpMatches(patch, r'^diff --git a/test_file_commit1 b/test_file_commit1')
+
def test_exists(self):
scm = self.untracking_scm
self._shared_test_exists(scm, scm.commit_locally_with_message)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698