From df27b5e7d6cb210b5a0870eb671a983336fb95c7 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Wed, 14 Nov 2007 10:24:22 -0800 Subject: added 'archive' and tests --- lib/git/object.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/git/object.rb') diff --git a/lib/git/object.rb b/lib/git/object.rb index 7702811..c811810 100644 --- a/lib/git/object.rb +++ b/lib/git/object.rb @@ -48,6 +48,11 @@ module Git Git::Log.new(@base, count).object(@sha) end + # creates an archive of this object (tree) + def archive(file = nil, opts = {}) + @base.lib.archive(@sha, file, opts) + end + end -- cgit