Do no update total while installing/updating, etc. Closes #139.

This commit is contained in:
Jorge Bucaran 2016-03-01 23:59:43 +09:00
parent cf9d9469fe
commit 986a9cad56
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30
4 changed files with 7 additions and 15 deletions

View File

@ -7,9 +7,8 @@ function __fisher_path_update -a path
return 1
end
git checkout master --quiet ^ /dev/null
git stash --quiet ^ /dev/null
git checkout master --quiet ^ /dev/null
if not git pull --rebase origin master --quiet ^ /dev/null
git rebase --abort --quiet
@ -18,11 +17,11 @@ function __fisher_path_update -a path
git clean -d --force --quiet
end
git stash apply --quiet ^ /dev/null
if test ! -z "$branch"
git checkout "$branch" --quiet
end
git stash apply --quiet ^ /dev/null
popd
end

View File

@ -67,7 +67,6 @@ function fisher_install -d "Install plugins"
if set -l name (__fisher_gist_to_name $item)
printf "%s\t%s\n" $item $name
else
set total (math $total - 1)
printf "fisher: Repository '%s' not found.\n" $item > $stderr
end
@ -83,7 +82,7 @@ function fisher_install -d "Install plugins"
else
if test ! -s $fisher_cache/.index
printf "$indicator Updating Index %s\n" $name > $stderr
printf "$indicator Updating the index %s\n" $name > $stderr
if spin "__fisher_index_update" --error=/dev/null -f " @\r" > /dev/null
debug "Update index ok"
@ -100,7 +99,6 @@ function fisher_install -d "Install plugins"
set -l path (__fisher_function_to_plugin $item)
printf "%s\t%s" "$path" $item
else
set total (math $total - 1)
printf "fisher: '%s' not found or index out of date.\n" $item > $stderr
end
end
@ -109,7 +107,6 @@ function fisher_install -d "Install plugins"
end | while read -l url name
if contains -- $name (fisher_list $fisher_file)
if test -z "$option"
set total (math $total - 1)
set skipped $skipped $name
continue
end
@ -151,7 +148,6 @@ function fisher_install -d "Install plugins"
end
if not __fisher_path_make "$path" --quiet
set total (math $total - 1)
continue
end

View File

@ -47,7 +47,7 @@ function fisher_uninstall -d "Uninstall plugins"
printf "%s\n" $plugins
else
__fisher_file
end | while read -l item path
debug "Validate %s" $item
@ -60,7 +60,6 @@ function fisher_uninstall -d "Uninstall plugins"
debug "Validate ok %s" $item
if not set path (__fisher_path_from_plugin $item)
set total (math $total - 1)
printf "fisher: '%s' not found\n" $item > $stderr
continue
end
@ -71,7 +70,6 @@ function fisher_uninstall -d "Uninstall plugins"
if not contains -- $name (fisher_list $fisher_file)
if test -z "$option"
set total (math $total - 1)
set skipped $skipped $name
continue
end

View File

@ -47,7 +47,7 @@ function fisher_update -d "Update plugins"
debug "Update %s" $fisher_index
debug "Update %s" $fisher_home
printf "$indicator Updating Index\n" > $stderr
printf "$indicator Updating the index\n" > $stderr
if not spin "__fisher_index_update 0" --error=$stderr -f " @\r"
debug "Update Index fail"
@ -82,7 +82,7 @@ function fisher_update -d "Update plugins"
printf "%s\n" $plugins
else
__fisher_file
end | while read -l item path
debug "Validate %s" $item
@ -96,7 +96,6 @@ function fisher_update -d "Update plugins"
debug "Validate ok %s" $item
if not set path (__fisher_path_from_plugin $item)
set total (math $total - 1)
printf "fisher: '%s' not found.\n" $item > $stderr
continue
end