From fca41816e1ff986e550aacda2880eaacb0d91842 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Tue, 29 Mar 2016 21:22:14 +0900 Subject: [PATCH] Don't return 1 if there were no updates. --- functions/__fisher_path_update.fish | 4 ++-- functions/fisher_update.fish | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/__fisher_path_update.fish b/functions/__fisher_path_update.fish index 14b75f7..b735ae3 100644 --- a/functions/__fisher_path_update.fish +++ b/functions/__fisher_path_update.fish @@ -6,12 +6,12 @@ function __fisher_path_update -a path set -l commits ( git rev-list --left-right --count "master..FETCH_HEAD" ^ /dev/null | cut -d\t -f2) - git reset --quiet --hard FETCH_HEAD + git reset --quiet --hard FETCH_HEAD ^ /dev/null git clean -qdfx popd - if test "$commits" -eq 0 -o -z "$commits" + if test -z "$commits" -o "$commits" -eq 0 return 1 end diff --git a/functions/fisher_update.fish b/functions/fisher_update.fish index 1e2d32a..6af906f 100644 --- a/functions/fisher_update.fish +++ b/functions/fisher_update.fish @@ -135,7 +135,7 @@ function fisher_update -d "Update plugins" if test -z "$fisher_updated_plugins" printf "No plugins were updated.\n" > $stdout set -e fisher_updated_plugins - return 1 + return end end