summaryrefslogtreecommitdiffstats
path: root/lib/git/lib.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-19 07:50:33 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-19 07:50:33 -0800
commitd7479317e33ec08d6a7a0d841722058c2b6aa98a (patch)
treee09cbfbfbdff3cfb1af654a864257841f2370886 /lib/git/lib.rb
parent824ab0ec43a3c9306e75e87537f8e2b3bcc3254e (diff)
downloadthird_party-ruby-git-d7479317e33ec08d6a7a0d841722058c2b6aa98a.tar.gz
third_party-ruby-git-d7479317e33ec08d6a7a0d841722058c2b6aa98a.tar.xz
third_party-ruby-git-d7479317e33ec08d6a7a0d841722058c2b6aa98a.zip
more speed improvements
Diffstat (limited to 'lib/git/lib.rb')
-rw-r--r--lib/git/lib.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb
index 0d44183..c6d3580 100644
--- a/lib/git/lib.rb
+++ b/lib/git/lib.rb
@@ -82,6 +82,9 @@ module Git
end
def revparse(string)
+ if /\w{40}/.match(string) # passing in a sha - just no-op it
+ return string
+ end
command('rev-parse', string)
end