mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Simplify update mechanism, avoid merges.
This commit is contained in:
parent
88b0e6ecc7
commit
ee9164ac6e
1 changed files with 13 additions and 6 deletions
|
@ -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 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
|
||||||
git clean --quiet -dx --force
|
git clean -qdfx
|
||||||
end ^ /dev/null
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
if test "$commits" -eq 0 -o -z "$commits"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
printf "%s\n" "$commits"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue