fix: fix flags counting in `dot`

ignore git flags (--*)

correct merging error message
This commit is contained in:
David 2021-01-13 00:47:39 +01:00
parent c07b1b9a8e
commit 5c385ece97
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ flags="false"
for arg in $@
do
case $arg in
--*) ;;
-*) [ "$flags" = "true" ] && flags="error" && break || flags="true" ;;
esac
done
@ -42,7 +43,7 @@ case $1 in
[ "$1" = "-d" ] && shift && cmd="$git diff $@" && break
if [ "$1" = "-m" ] ; then
shift
[ "$1" = "" ] && echo "Please provide a branche to merge from" && exit 1
[ "$1" = "" ] && echo "Please provide a branche to merge into" && exit 1
if [ "$1" != "-a" ] ; then
while [ "$1" != "" ] ; do
$git checkout $1 && $git merge dev