Merge pull request #7769 from sjackman/update-reset

update-reset: Use the default branch origin/HEAD
This commit is contained in:
Shaun Jackman 2020-06-19 10:33:24 -07:00 committed by GitHub
commit f73f1993b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,9 @@ homebrew-update-reset() {
echo echo
ohai "Resetting $DIR..." ohai "Resetting $DIR..."
git checkout --force -B master origin/master head="$(git symbolic-ref refs/remotes/origin/HEAD)"
head="${head#refs/remotes/origin/}"
git checkout --force -B "$head" origin/HEAD
echo echo
done done
} }