Simplify update mechanism, avoid merges.

This commit is contained in:
Jorge Bucaran 2016-03-29 01:21:51 +09:00
parent 3f47e4e10c
commit 2888a63b98
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -1,12 +1,19 @@
function __fisher_path_update -a path function __fisher_path_update -a path
pushd $path pushd $path
if not git pull --quiet --rebase origin master git fetch --quiet origin master ^ /dev/null
git rebase --abort
git fetch --quiet origin master set -l commits (
git reset --quiet --hard FETCH_HEAD git rev-list --left-right --count "master..FETCH_HEAD" ^ /dev/null | cut -d\t -f2)
git clean --quiet -dx --force
end ^ /dev/null git reset --quiet --hard FETCH_HEAD
git clean -qdfx
popd popd
if test "$commits" -eq 0 -o -z "$commits"
return 1
end
printf "%s\n" "$commits"
end end