From 8178ad80dfe728853bd7af627201eb2b9c0be0d2 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 13 Sep 2024 13:06:25 +0200 Subject: [PATCH] fix alias usage in git-pull-and-run-if-origin-changed --- bin/git-pull-and-run-if-origin-changed | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/git-pull-and-run-if-origin-changed b/bin/git-pull-and-run-if-origin-changed index 48c5f22e..fa34e06a 100755 --- a/bin/git-pull-and-run-if-origin-changed +++ b/bin/git-pull-and-run-if-origin-changed @@ -5,6 +5,9 @@ if [ -z "$1" ]; then exit 1 fi +shopt -s expand_aliases +source .aliases + # get the current branch name BRANCH=$(git rev-parse --abbrev-ref HEAD) @@ -16,7 +19,7 @@ while true; do REMOTE=$(git rev-parse origin/$BRANCH) # check if the local branch differs from the remote branch - if [ "$LOCAL" != "$REMOTE" ]; then + if [ "$LOCAL" == "$REMOTE" ]; then echo "pulling changes from origin" git pull origin $BRANCH