update: passing --force to git fetch

Per document:
> -f, --force
>    When git fetch is used with <rbranch>:<lbranch> refspec, it refuses
>    to update the local branch <lbranch> unless the remote branch
>    <rbranch> it fetches is a descendant of <lbranch>. This option
>    overrides that check.
This commit is contained in:
Xu Cheng 2016-03-08 18:20:45 +08:00
parent 16f8b16f19
commit cad2a5620f

View File

@ -349,7 +349,7 @@ EOS
[[ "$UPSTREAM_SHA_HTTP_CODE" = "304" ]] && exit
fi
git fetch "${QUIET_ARGS[@]}" origin \
git fetch --force "${QUIET_ARGS[@]}" origin \
"refs/heads/$UPSTREAM_BRANCH:refs/remotes/origin/$UPSTREAM_BRANCH" || \
odie "Fetching $DIR failed!"
) &