Add difftool subcommands

This commit is contained in:
Jeremy Soller 2017-10-11 20:53:16 -06:00
parent d029991234
commit 5d1d2c58c1

31
cook.sh
View File

@ -25,6 +25,9 @@ function usage {
echo " diff" >&2
echo " diff_origin" >&2
echo " diff_upstream" >&2
echo " difftool" >&2
echo " difftool_origin" >&2
echo " difftool_upstream" >&2
echo " fetch" >&2
echo " unfetch" >&2
echo " prepare" >&2
@ -176,6 +179,34 @@ function op {
fi
fi
;;
difftool)
if [ -n "$GIT" ]
then
git -C source difftool -d
fi
;;
difftool_origin)
if [ -n "$GIT" ]
then
if [ -n "$BRANCH" ]
then
git -C source difftool -d "origin/$BRANCH"
else
git -C source difftool -d "origin/master"
fi
fi
;;
difftool_upstream)
if [ -n "$GIT_UPSTREAM" ]
then
if [ -n "$BRANCH" ]
then
git -C source difftool -d "upstream/$BRANCH"
else
git -C source difftool -d "upstream/master"
fi
fi
;;
update)
pushd source > /dev/null
skip=0