diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-27 23:50:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-27 23:50:17 +0300 |
commit | 4f2d2c90f7c32a9113ccce440411ec80374ee385 (patch) | |
tree | 312803a008da343b9e773324d8411557a271e918 /lib/gitlab/git/blob.rb | |
parent | df96c079ef3e358ea221ce4c43163d478b79a5e0 (diff) | |
download | gitlab-ce-4f2d2c90f7c32a9113ccce440411ec80374ee385.tar.gz |
Move Gitlab::Git out of gitlab core
Diffstat (limited to 'lib/gitlab/git/blob.rb')
-rw-r--r-- | lib/gitlab/git/blob.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb deleted file mode 100644 index 57b89912f2d..00000000000 --- a/lib/gitlab/git/blob.rb +++ /dev/null @@ -1,42 +0,0 @@ -module Gitlab - module Git - class Blob - include Linguist::BlobHelper - - attr_accessor :raw_blob - - delegate :name, to: :raw_blob - - def initialize(repository, sha, ref, path) - @repository, @sha, @ref = repository, sha, ref - - @commit = @repository.commit(sha) - @raw_blob = @repository.tree(@commit, path) - end - - def data - if raw_blob - raw_blob.data - else - nil - end - end - - def exists? - raw_blob - end - - def empty? - data.blank? - end - - def mode - raw_blob.mode - end - - def size - raw_blob.size - end - end - end -end |