提交 7418f1a0 编写于 作者: M Michael Haggerty 提交者: Junio C Hamano

cmd_fetch_pack(): return early if finish_connect() fails

This simplifies the logic without changing the behavior.
Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f537cfa7
......@@ -1018,10 +1018,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
close(fd[0]);
close(fd[1]);
if (finish_connect(conn))
ref = NULL;
ret = !ref;
return 1;
if (!ret && sought.nr) {
ret = !ref;
if (ref && sought.nr) {
/* If the heads to pull were given, we should have
* consumed all of them by matching the remote.
* Otherwise, 'git fetch remote no-such-ref' would
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册