diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 17:11:19 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 17:11:19 -0800 |
commit | 31b4f2b80616f570c83ed62d20f8b14ec5ba425b (patch) | |
tree | 57202ceb4c563ba5a53bc32e4c4e6ff90ecf7ba7 /lib/git/base.rb | |
parent | 907b03949bab53e2f7d55094100a71abd22f23e7 (diff) | |
download | third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.tar.gz third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.tar.xz third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.zip |
adding my testing git directory
Diffstat (limited to 'lib/git/base.rb')
-rw-r--r-- | lib/git/base.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/git/base.rb b/lib/git/base.rb index ffd8a2b..d97948e 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -90,6 +90,14 @@ module Git end end + def repo_size + size = 0 + Dir.chdir(repo.path) do + (size, dot) = `du -d0`.chomp.split + end + size.to_i + end + #g.config('user.name', 'Scott Chacon') # sets value #g.config('user.email', 'email@email.com') # sets value #g.config('user.name') # returns 'Scott Chacon' @@ -221,6 +229,9 @@ module Git # convenience methods + def repack + self.lib.repack + end def revparse(objectish) self.lib.revparse(objectish) |