feat(git) repass arguments to gitCommit if has args other than default command
This commit is contained in:
parent
75ab6597a3
commit
7140ca55e0
1 changed files with 6 additions and 2 deletions
8
git.sh
8
git.sh
|
@ -21,9 +21,10 @@ gitStatus() {
|
||||||
|
|
||||||
gitCommit() {
|
gitCommit() {
|
||||||
{
|
{
|
||||||
|
echo "gitCommit called"
|
||||||
git add .
|
git add .
|
||||||
read -p "Message: " message
|
read -p "Message: " message
|
||||||
git commit -m "$message" $2 $3 $4 $5 $6 $7 $8 $9
|
git commit -m "$message" $*
|
||||||
}|| {
|
}|| {
|
||||||
# Report; TODO: write log
|
# Report; TODO: write log
|
||||||
echo ">>> Commit failed"
|
echo ">>> Commit failed"
|
||||||
|
@ -47,6 +48,9 @@ elif [ "$1" = "push" ]; then
|
||||||
gitPush
|
gitPush
|
||||||
else
|
else
|
||||||
gitStatus
|
gitStatus
|
||||||
gitCommit $2 $3 $4 $5 $6 $7 $8 $9
|
if ! [ "$1" = "g" ]; then
|
||||||
|
gitCommit $*
|
||||||
|
fi
|
||||||
|
gitCommit
|
||||||
gitPush
|
gitPush
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue