Skip to content

Commit 86b45ed

Browse files
author
Daniel Mendler
committed
Merge branch 'master' of git://github.com/elliottcable/ruby-git
Conflicts: lib/git/lib.rb
2 parents 08922f6 + a512101 commit 86b45ed

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/git/lib.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def checkout_file(version, file)
463463
def merge(branch, message = nil)
464464
arr_opts = []
465465
arr_opts << '-m' << message if message
466-
arr_opts += branch.to_a
466+
arr_opts += [branch]
467467
command('merge', arr_opts)
468468
end
469469

@@ -543,7 +543,7 @@ def gc
543543
def read_tree(treeish, opts = {})
544544
arr_opts = []
545545
arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
546-
arr_opts += treeish.to_a
546+
arr_opts += [treeish]
547547
command('read-tree', arr_opts)
548548
end
549549

@@ -560,7 +560,7 @@ def commit_tree(tree, opts = {})
560560
arr_opts = []
561561
arr_opts << tree
562562
arr_opts << '-p' << opts[:parent] if opts[:parent]
563-
arr_opts += opts[:parents].map { |p| ['-p', p] }.flatten if opts[:parents]
563+
arr_opts += [opts[:parents]].map { |p| ['-p', p] }.flatten if opts[:parents]
564564
command('commit-tree', arr_opts, true, "< #{escape t.path}")
565565
end
566566

@@ -617,7 +617,7 @@ def command(cmd, opts = [], chdir = true, redirect = '', &block)
617617
ENV['GIT_WORK_TREE'] = @git_work_dir
618618
path = @git_work_dir || @git_dir || @path
619619

620-
opts = opts.map {|s| escape(s) }.join(' ')
620+
opts = [opts].flatten.map {|s| escape(s) }.join(' ')
621621
git_cmd = "git #{cmd} #{opts} #{redirect} 2>&1"
622622

623623
out = nil

lib/git/object.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ def self.new(base, objectish, type = nil, is_tag = false)
262262
type ||= base.lib.object_type(objectish)
263263
klass =
264264
case type
265-
when /blob/: Blob
266-
when /commit/: Commit
267-
when /tree/: Tree
265+
when /blob/ then Blob
266+
when /commit/ then Commit
267+
when /tree/ then Tree
268268
end
269269
klass.new(base, objectish)
270270
end

ruby-git.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
spec = Gem::Specification.new do |s|
22
s.platform = Gem::Platform::RUBY
33
s.name = "git"
4-
s.version = "1.0.7"
4+
s.version = "1.0.8"
55
s.author = "Scott Chacon"
66
s.email = "schacon@gmail.com"
77
s.summary = "A package for using Git in Ruby code."

0 commit comments

Comments
 (0)