From 0f192fe0dc094d6e22726bc9d63ec826711eb929 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 21 Jun 2018 19:54:39 +0200 Subject: [PATCH] local/bin/homesync: Use push remote instead of upstream --- .local/bin/homesync | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.local/bin/homesync b/.local/bin/homesync index 0a9f4553..82d613f3 100755 --- a/.local/bin/homesync +++ b/.local/bin/homesync @@ -58,12 +58,12 @@ project_status() { for i in ~/dotfiles ~/.password-store ~/personal ~/projects/* ~/.local/share/emacs/site-lisp/* "$@"; do [ ! -d "$i/.git" ] && continue CHANGED=true - upstream=$(git -C "$i" rev-parse --abbrev-ref --symbolic-full-name @{u} 2>&1) + push=$(git -C "$i" rev-parse --abbrev-ref --symbolic-full-name @{push} 2>&1) if [ $? -eq 0 ]; then - unmerged=$(git -C "$i" log --oneline "$upstream"..) - project_status "$i" "Unmerged commits" "$unmerged" + unmerged=$(git -C "$i" log --oneline "$push"..) + project_status "$i" "Unpushed commits" "$unmerged" else - project_status "$i" "Unmerged commits" "$upstream" + project_status "$i" "Unpushed commits" "No 'push' remote" fi project_status "$i" "Unstaged files" "$(git -C "$i" diff --name-only)" project_status "$i" "Staged files" "$(git -C "$i" diff --name-only --cached)"