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
|
[[ -d "$DIR/.git" ]] || continue
|
||||||
cd "$DIR" || continue
|
cd "$DIR" || continue
|
||||||
echo "==> Fetching $DIR..."
|
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
|
git fetch --force --tags origin
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "==> Resetting $DIR..."
|
echo "==> Resetting $DIR..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user