Title: [294524] trunk/Tools/Scripts/hooks/prepare-commit-msg
- Revision
- 294524
- Author
- gsnedd...@apple.com
- Date
- 2022-05-19 19:32:27 -0700 (Thu, 19 May 2022)
Log Message
prepare-commit-msg should be no-op with --no-edit
https://bugs.webkit.org/show_bug.cgi?id=240689
Reviewed by Jonathan Bedard.
* Tools/Scripts/hooks/prepare-commit-msg:
Canonical link: https://commits.webkit.org/250779@main
Modified Paths
Diff
Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (294523 => 294524)
--- trunk/Tools/Scripts/hooks/prepare-commit-msg 2022-05-20 02:14:43 UTC (rev 294523)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg 2022-05-20 02:32:27 UTC (rev 294524)
@@ -77,6 +77,10 @@
if source not in (None, 'commit', 'template'):
return 0
+ if os.environ.get('GIT_EDITOR', '') == ':':
+ # When there's no editor being launched, do nothing.
+ return 0
+
with open(file_name, 'w') as commit_message_file:
if sha:
commit_message_file.write(subprocess.check_output(
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes