git_repository: implement #to_s instead

This commit is contained in:
Carlo Cabrera 2023-04-24 22:34:09 +08:00
parent 93c3775147
commit 2f37877858
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -110,10 +110,9 @@ class GitRepository
end end
sig { returns(String) } sig { returns(String) }
def to_str def to_s
pathname.to_str pathname.to_s
end end
alias to_s to_str
private private