summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-03-13 11:48:37 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-03-13 11:49:32 +0100
commitae6d4aeb89ce87d5474f49cd180cfefc205262a2 (patch)
tree8d7d07e0354ecc1eb4ee16aa9b332accd39f98e7 /g
parent1613a4949fae679365996db2781c1fb26df9279f (diff)
g push/status: use @{upstream} instead of origin
origin won't work if origin/HEAD points to nowhere, which is a valid use-case.
Diffstat (limited to 'g')
-rwxr-xr-xg4
1 files changed, 2 insertions, 2 deletions
diff --git a/g b/g
index 5b39c462ef74..11ecaa607cbd 100755
--- a/g
+++ b/g
@@ -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