Skip to content

Commit 88c82a3

Browse files
proinsiassds
authored andcommitted
Add GitLfs post-checkout, post-commit and post-merge hooks
1 parent 1d3ecc6 commit 88c82a3

File tree

5 files changed

+41
-77
lines changed

5 files changed

+41
-77
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Overcommit Changelog
22

3+
## master (unreleased)
4+
5+
* Add [`GitLfs`](https://git-lfs.github.com/) post-checkout, post-commit and post-merge hooks
6+
37
## 0.42.0
48

59
### New Features

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ but before any objects have been transferred. If a hook fails, the push is
571571
aborted.
572572

573573
* [Brakeman](lib/overcommit/hook/pre_push/brakeman.rb)
574-
* [GitLfs](lib/overcommit/hook/pre_push/git_lfs.rb)
575574
* [Minitest](lib/overcommit/hook/pre_push/minitest.rb)
576575
* [ProtectedBranches](lib/overcommit/hook/pre_push/protected_branches.rb)
577576
* [Pytest](lib/overcommit/hook/pre_push/pytest.rb)

config/default.yml

+37-17
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,12 @@ PostCheckout:
822822
flags: ['install']
823823
include: 'composer.json'
824824

825+
GitLfs:
826+
enabled: false
827+
description: 'Check status of lockable files tracked by Git LFS'
828+
required_executable: 'git-lfs'
829+
install_command: 'brew install git-lfs'
830+
825831
IndexTags:
826832
enabled: false
827833
description: 'Generate tags file from source'
@@ -906,6 +912,12 @@ PostCommit:
906912
flags: ['HEAD~', 'HEAD']
907913
install_command: 'npm install -g git-guilt'
908914

915+
GitLfs:
916+
enabled: false
917+
description: 'Check status of lockable files tracked by Git LFS'
918+
required_executable: 'git-lfs'
919+
install_command: 'brew install git-lfs'
920+
909921
IndexTags:
910922
enabled: false
911923
description: 'Generate tags file from source'
@@ -974,6 +986,12 @@ PostMerge:
974986
flags: ['install']
975987
include: 'composer.json'
976988

989+
GitLfs:
990+
enabled: false
991+
description: 'Check status of lockable files tracked by Git LFS'
992+
required_executable: 'git-lfs'
993+
install_command: 'brew install git-lfs'
994+
977995
IndexTags:
978996
enabled: false
979997
description: 'Generate tags file from source'
@@ -1082,6 +1100,25 @@ PrePush:
10821100
required: false
10831101
quiet: false
10841102

1103+
Brakeman:
1104+
enabled: false
1105+
description: 'Check for security vulnerabilities'
1106+
required_executable: 'brakeman'
1107+
flags: ['--exit-on-warn', '--quiet', '--summary']
1108+
install_command: 'gem install brakeman'
1109+
1110+
GitLfs:
1111+
enabled: false
1112+
description: 'Upload files tracked by Git LFS'
1113+
required_executable: 'git-lfs'
1114+
install_command: 'brew install git-lfs'
1115+
1116+
Minitest:
1117+
enabled: false
1118+
description: 'Run Minitest test suite'
1119+
command: ['ruby', '-Ilib:test', '-rminitest', "-e 'exit! Minitest.run'"]
1120+
include: 'test/**/*_test.rb'
1121+
10851122
ProtectedBranches:
10861123
enabled: false
10871124
description: 'Check for illegal pushes to protected branches'
@@ -1115,28 +1152,11 @@ PrePush:
11151152
required_executable: 'rake'
11161153
install_command: 'gem install rake'
11171154

1118-
Minitest:
1119-
enabled: false
1120-
description: 'Run Minitest test suite'
1121-
command: ['ruby', '-Ilib:test', '-rminitest', "-e 'exit! Minitest.run'"]
1122-
include: 'test/**/*_test.rb'
1123-
11241155
TestUnit:
11251156
enabled: false
11261157
description: 'Run Test::Unit test suite'
11271158
command: ['ruby', '-Ilib:test', '-rtest/unit', "-e 'exit! Test::Unit::AutoRunner.run'"]
11281159

1129-
Brakeman:
1130-
enabled: false
1131-
description: 'Check for security vulnerabilities'
1132-
required_executable: 'brakeman'
1133-
flags: ['--exit-on-warn', '--quiet', '--summary']
1134-
install_command: 'gem install brakeman'
1135-
1136-
GitLfs:
1137-
enabled: false
1138-
description: 'Upload files tracked by Git LFS'
1139-
11401160
# Hooks that run during `git rebase`, before any commits are rebased.
11411161
# If a hook fails, the rebase is aborted.
11421162
PreRebase:

lib/overcommit/hook/pre_push/git_lfs.rb

-20
This file was deleted.

spec/overcommit/hook/pre_push/git_lfs_spec.rb

-39
This file was deleted.

0 commit comments

Comments
 (0)