We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 325199d commit 6e781eaCopy full SHA for 6e781ea
update.sh
@@ -2,9 +2,10 @@
2
cd "$(dirname "$0")"
3
4
if [ "$1" != "force" ]; then
5
- git fetch
6
- NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
7
- if [ "$NEW_COMMITS" -gt "0" ]; then
+ echo "Checking for updates..."
+ git fetch -q
+ NEW_COMMITS="$(git rev-list HEAD...@{upstream} --count)"
8
+ if [ "$NEW_COMMITS" -gt 0 ]; then
9
echo "Update available!"
10
else
11
echo "No update available. Use '$0 force' to skip the check."
0 commit comments