Use --default-prefix with update_patches (#28610)
This change adds `--default-prefix` to make sure we get the same patch format in any environment.
This commit is contained in:
@@ -38,7 +38,7 @@ async function writePatchFiles (modifiedPaths, gitRepoPath, patchDirPath) {
|
||||
|
||||
let writeOpsDoneCount = 0
|
||||
let writePatchOps = modifiedPaths.map(async (old, i) => {
|
||||
const singleDiffArgs = ['diff', '--src-prefix=a/', '--dst-prefix=b/', '--full-index', old]
|
||||
const singleDiffArgs = ['diff', '--src-prefix=a/', '--dst-prefix=b/', '--default-prefix', '--full-index', old]
|
||||
const patchContents = await util.runAsync('git', singleDiffArgs, { cwd: gitRepoPath, verbose: false })
|
||||
const patchFilename = patchFilenames[i]
|
||||
await fs.writeFile(path.join(patchDirPath, patchFilename), patchContents)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff --git i/tools/gritsettings/resource_ids.spec w/tools/gritsettings/resource_ids.spec
|
||||
index 2cd6ca756a745..decd3cac99da6 100644
|
||||
--- i/tools/gritsettings/resource_ids.spec
|
||||
+++ w/tools/gritsettings/resource_ids.spec
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 2cd6ca756a745e1387469914eb3d649dff104ccb..decd3cac99da6366259c9e425ec55ec775590fe7 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -38,6 +38,9 @@
|
||||
"chrome/app/chromium_strings.grd": {
|
||||
"messages": [800],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff --git i/tools/polymer/css_to_wrapper.py w/tools/polymer/css_to_wrapper.py
|
||||
index d76a3aa579e89..900ec9159da17 100644
|
||||
--- i/tools/polymer/css_to_wrapper.py
|
||||
+++ w/tools/polymer/css_to_wrapper.py
|
||||
diff --git a/tools/polymer/css_to_wrapper.py b/tools/polymer/css_to_wrapper.py
|
||||
index d76a3aa579e895ec9f237c76e022a3ebaafc02a3..900ec9159da17da16fd546116a96631333583bff 100644
|
||||
--- a/tools/polymer/css_to_wrapper.py
|
||||
+++ b/tools/polymer/css_to_wrapper.py
|
||||
@@ -275,7 +275,7 @@ def main(argv):
|
||||
|
||||
content = ''
|
||||
|
||||
Reference in New Issue
Block a user