Skip to content

Allow fetch operation to receive a ref param #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update remote object
  • Loading branch information
Joshua Liebowitz committed Apr 19, 2018
commit d9f7da0171e99dada6018f7f3e00efc951a58811
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.3.3
2 changes: 1 addition & 1 deletion lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def tag(name, *opts)
end


def fetch(remote, ref, opts)
def fetch(remote, ref = nil, opts)
arr_opts = [remote]
arr_opts << ref unless ref.nil?
arr_opts << '--tags' if opts[:t] || opts[:tags]
Expand Down
2 changes: 1 addition & 1 deletion lib/git/remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(base, name)
end

def fetch(opts={})
@base.fetch(@name, opts)
@base.fetch(@name, nil, opts)
end

# merge this remote locally
Expand Down