Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
985c672b
Commit
985c672b
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
update.sh: check upstream SHA prefetch not local.
Otherwise this can prevent taps from being updated as expected.
parent
080c4de9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cmd/update.sh
+9
-6
9 additions, 6 deletions
Library/Homebrew/cmd/update.sh
with
9 additions
and
6 deletions
Library/Homebrew/cmd/update.sh
+
9
−
6
View file @
985c672b
...
...
@@ -383,8 +383,15 @@ EOS
[[
-d
"
$DIR
/.git"
]]
||
continue
cd
"
$DIR
"
||
continue
if
[[
-n
"
$HOMEBREW_VERBOSE
"
]]
then
echo
"Checking if we need to fetch
$DIR
..."
fi
TAP_VAR
=
"
$(
repo_var
"
$DIR
"
)
"
declare
PREFETCH_REVISION
"
$TAP_VAR
"
=
"
$(
read_current_revision
)
"
UPSTREAM_BRANCH
=
"
$(
upstream_branch
)
"
declare
UPSTREAM_BRANCH
"
$TAP_VAR
"
=
"
$UPSTREAM_BRANCH
"
declare
PREFETCH_REVISION
"
$TAP_VAR
"
=
"
$(
git rev-parse
-q
--verify
refs/remotes/origin/
"
$UPSTREAM_BRANCH
"
)
"
[[
-n
"
$SKIP_FETCH_BREW_REPOSITORY
"
&&
"
$DIR
"
=
"
$HOMEBREW_REPOSITORY
"
]]
&&
continue
[[
-n
"
$SKIP_FETCH_CORE_REPOSITORY
"
&&
"
$DIR
"
=
"
$HOMEBREW_LIBRARY
/Taps/homebrew/homebrew-core"
]]
&&
continue
...
...
@@ -392,9 +399,6 @@ EOS
# The upstream repository's default branch may not be master;
# check refs/remotes/origin/HEAD to see what the default
# origin branch name is, and use that. If not set, fall back to "master".
UPSTREAM_BRANCH
=
"
$(
upstream_branch
)
"
declare
UPSTREAM_BRANCH
"
$TAP_VAR
"
=
"
$UPSTREAM_BRANCH
"
# the refspec ensures that the default upstream branch gets updated
(
if
[[
-n
"
$HOMEBREW_UPDATE_PREINSTALL
"
]]
...
...
@@ -485,9 +489,8 @@ EOS
export
HOMEBREW_UPDATE_AFTER
"
$TAP_VAR
"
=
"
$CURRENT_REVISION
"
else
merge_or_rebase
"
$DIR
"
"
$TAP_VAR
"
"
$UPSTREAM_BRANCH
"
[[
-n
"
$HOMEBREW_VERBOSE
"
]]
&&
echo
fi
[[
-n
"
$HOMEBREW_VERBOSE
"
]]
&&
echo
done
safe_cd
"
$HOMEBREW_REPOSITORY
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment