Merge pull request #5656 from MikeMcQuaid/update-reset-hang
update-reset: avoid hanging on shallow-since.
This commit is contained in:
commit
cbf049cc96
@ -35,14 +35,7 @@ homebrew-update-reset() {
|
||||
[[ -d "$DIR/.git" ]] || continue
|
||||
cd "$DIR" || continue
|
||||
echo "==> Fetching $DIR..."
|
||||
|
||||
if [[ "$DIR" = "$HOMEBREW_REPOSITORY" ]]; then
|
||||
latest_tag="$(git ls-remote --tags --refs -q origin | tail -n1 | cut -f2)"
|
||||
git fetch --force origin --shallow-since="$latest_tag"
|
||||
else
|
||||
git fetch --force --tags origin
|
||||
fi
|
||||
|
||||
git fetch --force --tags origin
|
||||
echo
|
||||
|
||||
echo "==> Resetting $DIR..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user