File tree Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env fish
2
+ git config core.hooksPath .githooks
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env fish
2
+
3
+ # Skip when it's not a branch checkout
4
+ # i.e. grstr == git restore --staged
5
+ # also, git checkout -- file
6
+ set is_branch " $argv [3]" # 1 means branch, 0 means no
7
+ if test " $is_branch " = 0
8
+ # FYI get rid of this output once I am happy with this hook not triggering
9
+ echo " skipping post-checkout hook b/c no branch set: '$is_branch '"
10
+ exit 0
11
+ end
12
+
13
+ echo " $(status current-filename) $argv "
14
+
15
+ # make clean && make tags
16
+ rag_indexer --githook
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env fish
2
+
3
+ echo " $(status current-filename) $argv "
4
+
5
+ if test -d " $(git rev-parse --git-dir)/rebase-merge"
6
+ or test -d " $(git rev-parse --git-dir)/rebase-apply"
7
+ or test -f " $(git rev-parse --git-dir)/MERGE_HEAD"
8
+ # skip for rebase/merge
9
+ exit
10
+ # by the way $1 seems to have # commits affected? during rebase?
11
+ # 3) 2)
12
+ end
13
+
14
+ # make clean && make tags
15
+ rag_indexer --githook
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env fish
2
+
3
+ echo " $(status current-filename) $argv "
4
+
5
+ # $1 == amend/rebase
6
+ # post-rewrite is called for amend and rebase
7
+ if test $argv [1] = amend
8
+ # amend will also trigger post-commit
9
+ echo " skipping '$argv [1]'"
10
+ exit
11
+ end
12
+
13
+ # make clean && make tags
14
+ rag_indexer --githook
You can’t perform that action at this time.
0 commit comments