Skip to content

Commit

Permalink
feat(rev-parse): silence
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Sep 14, 2022
1 parent beb9a85 commit 5e09d5d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gitapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
GITAPPER_HOOKS="$DIR/hooks"
GIT=$(which -a git | head -1)

if [[ "${PARAMETERS}" == "rev-parse --abbrev-ref HEAD" ]]; then
eval $GIT $PARAMETERS 2> /dev/null
exit 1
fi

source $DIR/lib/forgit.sh

function exec_hook() {
Expand All @@ -47,7 +52,11 @@ if [ "$GIT" = "" ]; then
fi

# General: Do not run hooks for --help or nw
if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMETERS}" == *"-n"* || "${PARAMETERS}" == *"gitapper"* ]]; then
if [[ "${PARAMETERS}" == *"--help"* ||
"${PARAMETERS}" == *"--nw"* ||
"${PARAMETERS}" == *"-n"* ||
"${PARAMETERS}" == *"gitapper"*
]]; then
ARGS=''
ARG=''
# Remove --nw parameter and pass to git
Expand Down

0 comments on commit 5e09d5d

Please sign in to comment.