Just quick update for my custom Git function

Also don't trigger our custom commit trick when amending stuff.

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-08-05 22:21:25 +08:00
parent 82f243fd8a
commit a6b7aea585
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ function git() {
echo "Setting HEAD to branch main"
command git symbolic-ref HEAD refs/heads/main
fi
elif [[ "$1" == "commit" && "$@" != *"--help"* && ( "$@" != *"--signoff"* && "$@" != *"-s"* ) ]]; then
elif [[ "$1" == "commit" && "$@" != *"--help"* && ( "$@" != *"--signoff"* && "$@" != *"-s"* && $@ != *"--amend" ) ]]; then
[ $DEBUG != "" ] && echo "args: $@ --signoff" && sleep 3
command git "$@" --signoff
else