Skip to content

Commit 86143b0

Browse files
committed
Allow specifying ref patterns to fetch
Mostly useful when fetching from a specific URL.
1 parent 887a258 commit 86143b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ def tag(name, *opts)
726726

727727
def fetch(remote, opts)
728728
arr_opts = [remote]
729+
arr_opts << opts[:refs] if opts[:refs]
729730
arr_opts << '--tags' if opts[:t] || opts[:tags]
730731
arr_opts << '--prune' if opts[:p] || opts[:prune]
731732
arr_opts << '--unshallow' if opts[:unshallow]

0 commit comments

Comments
 (0)