From: Felipe Contreras Date: Sat, 28 Sep 2013 22:03:56 GMT Subject: [PATCH v2 31/44] ruby: request-pull: use read_sha1_file() Message-ID: <1380405849-13000-32-git-send-email-felipe.contreras@gmail.com> In-Reply-To: <1380405849-13000-1-git-send-email-felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras --- 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