From 984ff7f0468ce9b89caeca95686f8b16983e83af Mon Sep 17 00:00:00 2001 From: Alex Bobrikovich Date: Fri, 17 Dec 2021 11:22:42 -0800 Subject: [PATCH] #533 Add --depth options for fetch call (#534) Signed-off-by: Alexande B --- lib/git/lib.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 66a37b60..4d0daef7 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -882,6 +882,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