aboutsummaryrefslogtreecommitdiff
path: root/git-hooks/post-commit
blob: 79b9aa0e9b3b3e6a7ab59ea6794f884ede1f4437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash

if [[ "$INSIDE_EMACS" == *magit ]]
then
    for arg in "$@"; do args+="\"$arg\""; done
    $GIT_EDITOR --eval \
      "(magit-run-git-hook '(common-post-commit post-commit) ${args[@]})"
fi

if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]]
then
    "$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@"
fi