Skip to content

Commit a8de13e

Browse files
author
TJ Biddle
committed
allow merge to pass along arguments. in my case, --squash
1 parent 92653eb commit a8de13e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/git/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def push(remote = 'origin', branch = 'master', tags = false)
310310
# merges one or more branches into the current working branch
311311
#
312312
# you can specify more than one branch to merge by passing an array of branches
313-
def merge(branch, message = 'merge')
314-
self.lib.merge(branch, message)
313+
def merge(branch, message = 'merge', arr = [])
314+
self.lib.merge(branch, message, arr)
315315
end
316316

317317
# iterates over the files which are unmerged

lib/git/lib.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ def checkout_file(version, file)
499499
command('checkout', arr_opts)
500500
end
501501

502-
def merge(branch, message = nil)
503-
arr_opts = []
502+
def merge(branch, message = nil, arr_opts = [])
504503
arr_opts << '-m' << message if message
505504
arr_opts += [branch]
506505
command('merge', arr_opts)

0 commit comments

Comments
 (0)