Changeset 295362 in webkit


Ignore:
Timestamp:
Jun 7, 2022 1:15:44 PM (2 years ago)
Author:
commit-queue@webkit.org
Message:

[git-webkit] git-webkit revert won't trigger pre-commit hook properly
https://bugs..webkit.org/show_bug.cgi?id=241202
rdar://problem/94251413

Patch by Zhifei Fang <facetothefate@gmail.com> on 2022-06-07
Reviewed by Jonathan Bedard.

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

Canonical link: https://commits.webkit.org/251370@main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/Scripts/hooks/prepare-commit-msg

    r295296 r295362  
    7575
    7676def main(file_name=None, source=None, sha=None):
    77     if source not in (None, 'commit', 'template'):
     77    with open(file_name, 'r') as commit_message_file:
     78        content = commit_message_file.read()
     79
     80    if source not in (None, 'commit', 'template', 'merge'):
     81        return 0
     82   
     83    if source == 'merge' and not content.startswith('Revert'):
    7884        return 0
    7985
Note: See TracChangeset for help on using the changeset viewer.