aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-18 14:07:10 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-18 14:07:10 +0200
commitfcc56dd878add0f1c215ff5522bf38f08fcf8b57 (patch)
treeaaf9c8c73b4f15657deab057ca16075769694993
parent6762b0fdfbad21c066abef85c9d434c6c1ba038a (diff)
Use split instead of scan
-rw-r--r--vcs_git.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcs_git.rb b/vcs_git.rb
index 5668ba3..4a51dfd 100644
--- a/vcs_git.rb
+++ b/vcs_git.rb
@@ -45,7 +45,7 @@ class VCS
end
def VCS.cat revision, file
- revs = runcmd(GITCMD, "log", "--format=format:%H").scan(/^(.*)$/).flatten.reverse
+ revs = runcmd(GITCMD, "log", "--format=format:%H").split("\n").reverse
runcmd(GITCMD, "show", "#{revs[revision-1]}:#{file}")
end