Commit 15f4908
authored
feat: introduce hook management commands for git hooks (#186)
- Remove unused import of `errors`
- Add an `init` function to register `hookInstallCmd` and `hookUninstallCmd` commands
- Remove argument validation and error handling from `hookCmd`
- Introduce `hookInstallCmd` command for installing the prepare-commit-msg hook
- Introduce `hookUninstallCmd` command for uninstalling the prepare-commit-msg hook
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>1 parent 3654952 commit 15f4908
1 file changed
Lines changed: 30 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
16 | 25 | | |
17 | | - | |
18 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
19 | 30 | | |
| 31 | + | |
| 32 | + | |
20 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
21 | 43 | | |
22 | 44 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | | - | |
| 48 | + | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
0 commit comments