Skip to content
Browse files
prepare-commit-msg should be no-op with --no-edit

Reviewed by Jonathan Bedard.

* Tools/Scripts/hooks/prepare-commit-msg:

Canonical link:
git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
gsnedders committed May 20, 2022
1 parent 0a91c41 commit 62fe12a3c1577028d0b3d13ad693abd2c98df700
Showing 1 changed file with 4 additions and 0 deletions.
@@ -77,6 +77,10 @@ def main(file_name=None, source=None, sha=None):
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:

0 comments on commit 62fe12a

Please sign in to comment.