Commit 7122fcd2 by Yuang Li

fix depth initialisation

parent 34de5c87
......@@ -177,7 +177,10 @@ int git_fetch_negotiate(git_remote *remote, const git_fetch_options *opts)
remote->need_pack = 0;
remote->nego.depth = (opts && !opts->unshallow) ? opts->depth : INT_MAX;
if (!opts)
remote->nego.depth = -1;
else
remote->nego.depth = opts->unshallow ? INT_MAX : opts->depth;
if (filter_wants(remote, opts) < 0)
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment