Skip to content

Commit e1d819b

Browse files
author
Tod Beardsley
committed
Update the comment docs on pre-commit-hook.rb
[SeeRM rapid7#8779]
1 parent 70c0a19 commit e1d819b

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

tools/dev/pre-commit-hook.rb

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
#!/usr/bin/env ruby
22

3-
# Check that modules actually pass msftidy checks first.
4-
# To install this script, make this your pre-commit hook your local
5-
# metasploit-framework clone. For example, if you have checked out
6-
# the Metasploit Framework to:
3+
# Check that modules actually pass msftidy checks before committing
4+
# or after merging.
75
#
8-
# /home/mcfakepants/git/metasploit-framework
6+
# Simply symlink this script to your local .git/hooks/pre-commit script
7+
# and your .git/hooks/post-merge scripts. Note the lack of a trailing
8+
# .rb
99
#
10-
# then you will copy this script to:
10+
# If you are in the top-level dir, the symlink commands would be:
1111
#
12-
# /home/mcfakepants/git/metasploit-framework/.git/hooks/pre-commit
12+
# ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-commit
13+
# ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
1314
#
14-
# You must mark it executable (chmod +x), and do not name it
15-
# pre-commit.rb (just pre-commit)
16-
#
17-
# If you want to keep up on changes with this hook, just:
18-
#
19-
# ln -sf <this file> <path to commit hook>
15+
# That way, you will track changes to this script when it updates
16+
# (rarely). If you'd prefer to copy it directly, that's okay, too (mark
17+
# it +x and don't name it filename.rb, just filename).
2018

2119
def merge_error_message
2220
msg = []

0 commit comments

Comments
 (0)