Skip to content

Commit

Permalink
feat(grumphp): new parameter for integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed Jul 21, 2022
1 parent 7819e27 commit 02cdfba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gitapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ if [ "$GIT" = "" ]; then
fi

# General: Do not run hooks for --help or nw
if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMETERS}" == *"gitapper"* ]]; then
if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMETERS}" == *"-n"* || "${PARAMETERS}" == *"gitapper"* ]]; then
ARGS=''
ARG=''
# Remove --nw parameter and pass to git
for i in "$@"
do
if [[ $i =~ "[[:space:]]" || $i != *"--nw"* ]]
if [[ $i =~ "[[:space:]]" || $i != *"--nw"* || $i != *"-n"* ]]
then
i2=\"$i\"
ARG=$i
Expand All @@ -63,10 +63,13 @@ if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMET
fi
ARGS="$ARGS $ARG"
i=$i2
elif [[== *"-n"* ]]
then
ARGS="$ARGS -n"
fi
done
PARAMETERS=$ARGS

eval $GIT$PARAMETERS
else
GIT_PARAMETERS=$PARAMETERS
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ alias git=/your/path/where/you/downloaded/gitapper

```
--nw (As last command) Disable gitapper and pass all the parameters to the real git
--n (As last command) Disable gitapper and pass -n parameter to the real git (integration with GrumPHP)
```

## Hooks
Expand Down

0 comments on commit 02cdfba

Please sign in to comment.