[PATCH v2 31/44] ruby: request-pull: use read_sha1_file()
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
git-request-pull.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-request-pull.rb b/git-request-pull.rb
index 5f40901..233981f 100755
--- a/git-request-pull.rb
+++ b/git-request-pull.rb
@@ -165,7 +165,8 @@ for you to fetch changes up to %s:
$stderr.puts "warn: appear to be at #{url}"
$stderr.puts "warn: Do you want to push it there, perhaps?"
end
- run(%[git cat-file tag "#{tag_name}" | sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p])
+ buffer, _ = read_sha1_file(get_sha1(tag_name))
+ puts buffer.scan(/(?:\n\n)(.+)(?:-----BEGIN PGP )?/m).first
puts
end
--
1.8.4-fc