From 7140ca55e053b7d140d847ebeb5a15f289f42599 Mon Sep 17 00:00:00 2001 From: Ayo Date: Mon, 23 Jun 2025 13:20:14 +0200 Subject: [PATCH] feat(git) repass arguments to gitCommit if has args other than default command --- git.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/git.sh b/git.sh index 0d7b715..943302a 100755 --- a/git.sh +++ b/git.sh @@ -21,9 +21,10 @@ gitStatus() { gitCommit() { { + echo "gitCommit called" git add . read -p "Message: " message - git commit -m "$message" $2 $3 $4 $5 $6 $7 $8 $9 + git commit -m "$message" $* }|| { # Report; TODO: write log echo ">>> Commit failed" @@ -47,6 +48,9 @@ elif [ "$1" = "push" ]; then gitPush else gitStatus - gitCommit $2 $3 $4 $5 $6 $7 $8 $9 + if ! [ "$1" = "g" ]; then + gitCommit $* + fi + gitCommit gitPush fi