Merge pull request #15300 from carlocab/git-repo-str
git_repository: implement `#to_s`
This commit is contained in:
		
						commit
						4f179c54a3
					
				| @ -161,10 +161,10 @@ module Homebrew | |||||||
|     package_name = package_file.basename.to_s.chomp(".rb") |     package_name = package_file.basename.to_s.chomp(".rb") | ||||||
| 
 | 
 | ||||||
|     odebug "Cherry-picking #{package_file}: #{commit}" |     odebug "Cherry-picking #{package_file}: #{commit}" | ||||||
|     Utils::Git.cherry_pick!(git_repo, commit, verbose: verbose, resolve: resolve) |     Utils::Git.cherry_pick!(git_repo.to_s, commit, verbose: verbose, resolve: resolve) | ||||||
| 
 | 
 | ||||||
|     old_package = Utils::Git.file_at_commit(git_repo, file, "HEAD^") |     old_package = Utils::Git.file_at_commit(git_repo.to_s, file, "HEAD^") | ||||||
|     new_package = Utils::Git.file_at_commit(git_repo, file, "HEAD") |     new_package = Utils::Git.file_at_commit(git_repo.to_s, file, "HEAD") | ||||||
| 
 | 
 | ||||||
|     bump_subject = determine_bump_subject(old_package, new_package, package_file, reason: reason).strip |     bump_subject = determine_bump_subject(old_package, new_package, package_file, reason: reason).strip | ||||||
|     subject, body, trailers = separate_commit_message(git_repo.commit_message) |     subject, body, trailers = separate_commit_message(git_repo.commit_message) | ||||||
|  | |||||||
| @ -109,6 +109,11 @@ class GitRepository | |||||||
|     popen_git("log", "-1", "--pretty=%B", commit, "--", safe: safe, err: :out)&.strip |     popen_git("log", "-1", "--pretty=%B", commit, "--", safe: safe, err: :out)&.strip | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  |   sig { returns(String) } | ||||||
|  |   def to_s | ||||||
|  |     pathname.to_s | ||||||
|  |   end | ||||||
|  | 
 | ||||||
|   private |   private | ||||||
| 
 | 
 | ||||||
|   sig { params(args: T.untyped, safe: T::Boolean, err: T.nilable(Symbol)).returns(T.nilable(String)) } |   sig { params(args: T.untyped, safe: T::Boolean, err: T.nilable(Symbol)).returns(T.nilable(String)) } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Carlo Cabrera
						Carlo Cabrera