Skip to content

Commit 02cdfba

Browse files
committed
feat(grumphp): new parameter for integration
1 parent 7819e27 commit 02cdfba

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

gitapper.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ if [ "$GIT" = "" ]; then
4747
fi
4848

4949
# General: Do not run hooks for --help or nw
50-
if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMETERS}" == *"gitapper"* ]]; then
50+
if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMETERS}" == *"-n"* || "${PARAMETERS}" == *"gitapper"* ]]; then
5151
ARGS=''
5252
ARG=''
5353
# Remove --nw parameter and pass to git
5454
for i in "$@"
5555
do
56-
if [[ $i =~ "[[:space:]]" || $i != *"--nw"* ]]
56+
if [[ $i =~ "[[:space:]]" || $i != *"--nw"* || $i != *"-n"* ]]
5757
then
5858
i2=\"$i\"
5959
ARG=$i
@@ -63,10 +63,13 @@ if [[ "${PARAMETERS}" == *"--help"* || "${PARAMETERS}" == *"--nw"* || "${PARAMET
6363
fi
6464
ARGS="$ARGS $ARG"
6565
i=$i2
66+
elif [[== *"-n"* ]]
67+
then
68+
ARGS="$ARGS -n"
6669
fi
6770
done
6871
PARAMETERS=$ARGS
69-
72+
7073
eval $GIT$PARAMETERS
7174
else
7275
GIT_PARAMETERS=$PARAMETERS

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ alias git=/your/path/where/you/downloaded/gitapper
3232

3333
```
3434
--nw (As last command) Disable gitapper and pass all the parameters to the real git
35+
--n (As last command) Disable gitapper and pass -n parameter to the real git (integration with GrumPHP)
3536
```
3637

3738
## Hooks

0 commit comments

Comments
 (0)