mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
eec6b67e16
* Fix bug in fisher_config_color_reset not declaring path variable. * Silence Git checkout standard error to prevent update failures in some edge cases. * Revise and correct errors in the documentation and README. * Add more instrumentation to fisher_plugin_disable. * Minor doc updates.
27 lines
615 B
Fish
27 lines
615 B
Fish
function __fisher_path_update -a path
|
|
pushd $path
|
|
|
|
set -l branch
|
|
|
|
if not set branch (sed "s|.*/||" < .git/HEAD)
|
|
return 1
|
|
end
|
|
|
|
git stash --quiet ^ /dev/null
|
|
git checkout master --quiet ^ /dev/null
|
|
|
|
if not git pull --quiet --rebase origin master
|
|
git rebase --quiet --abort
|
|
git fetch --quiet origin master
|
|
git reset --quiet --hard FETCH_HEAD
|
|
git clean --quiet -d --force
|
|
end ^ /dev/null
|
|
|
|
if test ! -z "$branch"
|
|
git checkout "$branch" --quiet ^ /dev/null
|
|
end
|
|
|
|
git stash apply --quiet ^ /dev/null
|
|
|
|
popd
|
|
end
|