зеркало из https://github.com/github/grit.git
36 строки
1.5 KiB
Plaintext
36 строки
1.5 KiB
Plaintext
This is a listing of all the places I can find that Grit actually does a
|
|
'git' system call. My goal is to add native Ruby versions of all of them.
|
|
|
|
Completed
|
|
===========================
|
|
** lib/grit/blob.rb:36: @size ||= @repo.git.cat_file({:s => true}, id).chomp.to_i
|
|
** lib/grit/blob.rb:43: @data ||= @repo.git.cat_file({:p => true}, id)
|
|
** lib/grit/tree.rb:16: output = repo.git.ls_tree({}, treeish, *paths)
|
|
|
|
|
|
|
|
lib/grit/commit.rb:74: repo.git.rev_list({}, ref).strip.split("\n").size
|
|
lib/grit/commit.rb:92: output = repo.git.rev_list(actual_options, ref)
|
|
lib/grit/commit.rb:94: output = repo.git.rev_list(actual_options.merge(:all => true))
|
|
|
|
|
|
Next to do
|
|
===========================
|
|
lib/grit/tag.rb:28: output = repo.git.for_each_ref(actual_options, "refs/tags")
|
|
lib/grit/head.rb:37: output = repo.git.for_each_ref(actual_options, HEAD_PREFIX)
|
|
lib/grit/head.rb:50: self.new($1, repo.git.rev_parse(options, 'HEAD'))
|
|
lib/grit/config.rb:9: @repo.git.config({}, key, value)
|
|
lib/grit/config.rb:40: @repo.git.config(:list => true).split(/\n/)
|
|
|
|
|
|
May not be fast enough
|
|
=============================
|
|
lib/grit/blob.rb:58: data = repo.git.blame({:p => true}, commit, '--', file)
|
|
|
|
|
|
More Difficult
|
|
===========================
|
|
lib/grit/commit.rb:39: @id_abbrev ||= @repo.git.rev_parse({:short => true}, self.id).chomp
|
|
lib/grit/commit.rb:150: text = repo.git.diff({:full_index => true}, *paths)
|
|
lib/grit/commit.rb:156: diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
|