Added history command

This commit is contained in:
JeremyStarTM 2022-08-14 13:28:33 +02:00
parent 30a9ff1e8a
commit 1697df4701

View file

@ -397,6 +397,7 @@ elif [ "$1" == "help" ]; then
echo " getrepo <repository>" echo " getrepo <repository>"
echo " help" echo " help"
echo " helpextend" echo " helpextend"
echo " history <repository>"
echo " install <repository>" echo " install <repository>"
echo " list" echo " list"
echo " pull <repository>" echo " pull <repository>"
@ -417,6 +418,7 @@ elif [ "$1" == "helpextend" ]; then
echo "getrepo | <user> <repository> | clone a repository" echo "getrepo | <user> <repository> | clone a repository"
echo "help | | lists all commands" echo "help | | lists all commands"
echo "helpextend | | lists all commands with extended information" echo "helpextend | | lists all commands with extended information"
echo "history | <repository> | shows commit history"
echo "install | <repository> | install built executables" echo "install | <repository> | install built executables"
echo "list | | lists all cloned repositories" echo "list | | lists all cloned repositories"
echo "pull | <repository> | pull new updates" echo "pull | <repository> | pull new updates"
@ -621,6 +623,17 @@ elif [ "$1" == "branch" ]; then
else else
noRepoFound "$2" noRepoFound "$2"
fi 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 else
argumentMissing argumentMissing
fi fi