1b3fdb18e3
* fix: remove 'shell=True' when calling 'git diff' Calling subprocess.Popen() with a list of args and shell=True causes the args to be ignored, so ['git', 'diff', '--name-only', '--staged'] was turning into just 'git'. Instead of getting a list of changed files, we got the --help message. Two possible fixes: change it from a list to a single string, or remove 'shell=True'. The shell doesn't seem to be needed, so I chose that. More reading: https://stackoverflow.com/questions/26417658/subprocess-call-arguments-ignored-when-using-shell-true-w-list * fix: remove 'shell=True' when calling clang-format Same problem / rationale as previous commit. * fix: re-add shell=True for win; use different fix |
||
---|---|---|
.. | ||
lib | ||
release-notes | ||
apply-patches | ||
bump-version.py | ||
check-relative-doc-links.py | ||
chrome_version.h.in | ||
ci-release-build.js | ||
dbus_mock.py | ||
dump-symbols.py | ||
find-release.js | ||
get-last-major-for-master.js | ||
get-patch | ||
get-version.py | ||
install-sysroot.py | ||
lint.js | ||
merge-electron-checksums.py | ||
patch.py | ||
prepare-release.js | ||
publish-to-npm.js | ||
pump.py | ||
README.md | ||
rebuild-test-modules.py | ||
release-artifact-cleanup.js | ||
release.js | ||
run-clang-format.py | ||
serve-node-headers.py | ||
spec-runner.js | ||
start.js | ||
sysroots.json | ||
test.py | ||
tls.py | ||
update-external-binaries.py | ||
upload-index-json.py | ||
upload-node-checksums.py | ||
upload-node-headers.py | ||
upload-symbols.py | ||
upload-to-github.js | ||
upload.py | ||
verify-ffmpeg.py |
get-patch
Use it to save commits from upstream repositories as patch files.
Examples
- Write commit contents in the patch format to stdout.
$ ./script/get-patch --repo src --commit 8e8216e5
- Create a patch file with a default name if a specified directory.
$ ./script/get-patch --repo src --commit 8e8216e5 --output-dir patches
- Create a patch file with a custom name in the current directory.
$ ./script/get-patch --repo src --commit 8e8216e5 --filename my.patch
- Create a patch file with a custom name in a specified directory.
$ ./script/get-patch --repo src --commit 8e8216e5 --output-dir patches --filename my.patch
- Create patch files with default names in a specified directory.
$ ./script/get-patch --repo src --output-dir patches --commit 8e8216e5 164c37e3
- Create patch files with custom names in a specified directory. Note that number of filenames must match the number of commits.
$ ./script/get-patch --repo src --output-dir patches --commit 8e8216e5 164c37e3 --filename first.patch second.patch