Merge pull request #12510 from boblail/lail/silence-advice.detachedHead-always
Silence the detachedHead warning when ref_type is a revision
This commit is contained in:
		
						commit
						371122da55
					
				@ -883,9 +883,9 @@ class GitDownloadStrategy < VCSDownloadStrategy
 | 
			
		||||
    case @ref_type
 | 
			
		||||
    when :branch, :tag
 | 
			
		||||
      args << "--branch" << @ref
 | 
			
		||||
      args << "-c" << "advice.detachedHead=false" # silences detached head warning
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    args << "-c" << "advice.detachedHead=false" # silences detached head warning
 | 
			
		||||
    args << @url << cached_location
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
@ -915,6 +915,9 @@ class GitDownloadStrategy < VCSDownloadStrategy
 | 
			
		||||
    command! "git",
 | 
			
		||||
             args:  ["config", "remote.origin.tagOpt", "--no-tags"],
 | 
			
		||||
             chdir: cached_location
 | 
			
		||||
    command! "git",
 | 
			
		||||
             args:  ["config", "advice.detachedHead", "false"],
 | 
			
		||||
             chdir: cached_location
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  sig { params(timeout: T.nilable(Time)).void }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user