Skip to content

Commit

Permalink
Fetch from the branch HEAD points to instead of assuming it is master.
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnarFarneback committed Aug 4, 2023
1 parent b589a5b commit 0b0b970
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PackageCompatUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ function find_version_dates!(dates, registry_name, registry_repo, package_dir)
println()
else
if registry_name fetched_this_session
git("fetch", "-q", "origin", "master:master")
# Find the name of the branch which HEAD points to,
# usually `master` or `main`.
branch = only(git("symbolic-ref", "--short", "HEAD"))
git("fetch", "-q", "origin", "$(branch):$(branch)")
push!(fetched_this_session, registry_name)
end
end
Expand Down

0 comments on commit 0b0b970

Please sign in to comment.