aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2016-03-08 18:20:45 +0800
committerXu Cheng2016-03-08 20:36:19 +0800
commitcad2a5620fbd847bca78c6b17ea97c877224b724 (patch)
tree056b0a635c7499d8b32ecf4c34e003cc7f1bce2d /Library
parent16f8b16f190f92bd9f4af3db5464fc924bdcd854 (diff)
downloadbrew-cad2a5620fbd847bca78c6b17ea97c877224b724.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 8c2107a83..07847a0ba 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -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!"
) &