Kaydet (Commit) ae6d4aeb authored tarafından Miklos Vajna's avatar Miklos Vajna

g push/status: use @{upstream} instead of origin

origin won't work if origin/HEAD points to nowhere, which is a valid
use-case.
üst 1613a494
......@@ -321,11 +321,11 @@ for REPO in $DIRS ; do
;;
push)
if [ "$PUSH_ALL" != "1" ] ; then
[ -n "$(git rev-list origin..HEAD)" ] || exit 0
[ -n "$(git rev-list @{upstream}..HEAD)" ] || exit 0
fi
;;
status)
LOCALCOMMITS="$(git rev-list origin..HEAD)"
LOCALCOMMITS="$(git rev-list @{upstream}..HEAD)"
if [ -z "$LOCALCOMMITS" ] ; then
[ -z "$(git diff-index --name-only HEAD --)" ] && exit 0
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment