diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 57220f07..232b2fc4 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -879,6 +879,7 @@ def fetch(remote, opts) arr_opts << '--tags' if opts[:t] || opts[:tags] arr_opts << '--prune' if opts[:p] || opts[:prune] arr_opts << '--unshallow' if opts[:unshallow] + arr_opts << '--depth' << opts[:depth] if opts[:depth] command('fetch', arr_opts) end