From 1697df4701df4b60e98b360ccc012e4984c90ff8 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 14 Aug 2022 13:28:33 +0200 Subject: [PATCH] Added history command --- sos-git.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sos-git.sh b/sos-git.sh index eb886b2..c9ede93 100755 --- a/sos-git.sh +++ b/sos-git.sh @@ -397,6 +397,7 @@ elif [ "$1" == "help" ]; then echo " getrepo " echo " help" echo " helpextend" + echo " history " echo " install " echo " list" echo " pull " @@ -417,6 +418,7 @@ elif [ "$1" == "helpextend" ]; then echo "getrepo | | clone a repository" echo "help | | lists all commands" echo "helpextend | | lists all commands with extended information" + echo "history | | shows commit history" echo "install | | install built executables" echo "list | | lists all cloned repositories" echo "pull | | pull new updates" @@ -621,6 +623,17 @@ elif [ "$1" == "branch" ]; then else noRepoFound "$2" fi +elif [ "$1" == "history" ]; then + if [ "$2" == "" ]; then + argumentMissing + fi + if existRepo "$2"; then + translateRepo "$2" + cd "$SOSGIT_EXITSTRING" + git log + else + noRepoFound "$2" + fi else argumentMissing fi