summaryrefslogtreecommitdiffstats
path: root/lib/git/raw/internal/object.rb
diff options
context:
space:
mode:
authorScott Chacon <schacon@gmail.com>2008-03-08 18:14:15 -0800
committerScott Chacon <schacon@gmail.com>2008-03-08 18:14:15 -0800
commit1d845799ebc05bee9e3a68b7ad9dd5015277ca41 (patch)
treee84397c1359cc51189760477a4475e4279cfa01f /lib/git/raw/internal/object.rb
parent2d749e3aa69d7bfedf814f59618f964fdbc300d5 (diff)
downloadthird_party-ruby-git-1d845799ebc05bee9e3a68b7ad9dd5015277ca41.tar.gz
third_party-ruby-git-1d845799ebc05bee9e3a68b7ad9dd5015277ca41.tar.xz
third_party-ruby-git-1d845799ebc05bee9e3a68b7ad9dd5015277ca41.zip
reverted the pure ruby code to system calls and split the pure ruby to a new library
Diffstat (limited to 'lib/git/raw/internal/object.rb')
-rw-r--r--lib/git/raw/internal/object.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/git/raw/internal/object.rb b/lib/git/raw/internal/object.rb
deleted file mode 100644
index 172b917..0000000
--- a/lib/git/raw/internal/object.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# converted from the gitrb project
-#
-# authors:
-# Matthias Lederhofer <matled@gmx.net>
-# Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
-#
-# provides native ruby access to git objects and pack files
-#
-
-require 'digest/sha1'
-
-module Git
- module Raw
- module Internal
- OBJ_NONE = 0
- OBJ_COMMIT = 1
- OBJ_TREE = 2
- OBJ_BLOB = 3
- OBJ_TAG = 4
-
- OBJ_TYPES = [nil, :commit, :tree, :blob, :tag].freeze
-
- class RawObject
- attr_accessor :type, :content
- def initialize(type, content)
- @type = type
- @content = content
- end
-
- def sha1
- Digest::SHA1.digest("%s %d\0" % [@type, @content.length] + @content)
- end
- end
- end
- end
-end