File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -721,6 +721,7 @@ function read_package(path::String)
721721end
722722
723723const refspecs = [" +refs/heads/*:refs/remotes/cache/heads/*" ]
724+ const refspecs_fallback = [" +refs/*:refs/remotes/cache/*" ]
724725
725726function relative_project_path (project_file:: String , path:: String )
726727 # compute path relative the project
@@ -932,6 +933,11 @@ function handle_repo_add!(ctx::Context, pkg::PackageSpec)
932933 fetched = true
933934 GitTools. fetch (ctx. io, repo, repo_source_typed; refspecs= refspecs)
934935 obj_branch = get_object_or_branch (repo, rev_or_hash)
936+ # If still not found, try with broader refspec as fallback
937+ if obj_branch === nothing
938+ GitTools. fetch (ctx. io, repo, repo_source_typed; refspecs = refspecs_fallback)
939+ obj_branch = get_object_or_branch (repo, rev_or_hash)
940+ end
935941 if obj_branch === nothing
936942 pkgerror (" Did not find rev $(rev_or_hash) in repository" )
937943 end
You can’t perform that action at this time.
0 commit comments